summaryrefslogtreecommitdiffstats
path: root/superkaramba/examples/bar/bar.py
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2022-11-11 17:41:30 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2022-11-13 12:09:49 +0900
commitda9cd0c056c8275033fca84a1c8d49a8edb0c8ee (patch)
tree2521f74c0b2868d82518e13053fb01cc179e9a23 /superkaramba/examples/bar/bar.py
parent5dab6232ef3b3715630cf88eb40c4c6021e65f07 (diff)
downloadtdeutils-da9cd0c056c8275033fca84a1c8d49a8edb0c8ee.tar.gz
tdeutils-da9cd0c056c8275033fca84a1c8d49a8edb0c8ee.zip
superkaramba: convert examples to python3.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'superkaramba/examples/bar/bar.py')
-rw-r--r--superkaramba/examples/bar/bar.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/superkaramba/examples/bar/bar.py b/superkaramba/examples/bar/bar.py
index b018fe8..2ec029d 100644
--- a/superkaramba/examples/bar/bar.py
+++ b/superkaramba/examples/bar/bar.py
@@ -24,9 +24,9 @@ def widgetUpdated(widget):
# vertical & bitmap
b = karamba.getBarVertical(widget, bars[7])
- print "getVertical: " + str(b)
+ print("getVertical: " + str(b))
bmp = karamba.getBarImage(widget, bars[7])
- print "getBitmap: " + str(bmp)
+ print("getBitmap: " + str(bmp))
b = (b+1)%2
karamba.setBarVertical(widget, bars[7], b)
if(b):
@@ -38,13 +38,13 @@ def widgetUpdated(widget):
# size & resize
size = karamba.getBarSize(widget, bars[1])
- print "getBarSize: " + str(size)
+ print("getBarSize: " + str(size))
size = ((b * 100) + 100, size[1])
karamba.resizeBar(widget, bars[1], size[0], size[1])
# pos & move
pos = karamba.getBarPos(widget, bars[2])
- print "getBarPos: " + str(pos)
+ print("getBarPos: " + str(pos))
pos = (b * 200, pos[1])
karamba.moveBar(widget, bars[2], pos[0], pos[1])
@@ -56,19 +56,19 @@ def widgetUpdated(widget):
# Value
v = karamba.getBarValue(widget, bars[5])
- print "getBarValue: ", v
+ print("getBarValue: ", v)
v = (v + 10) % 110
karamba.setBarValue(widget, bars[5], v)
# Min Max
minmax = karamba.getBarMinMax(widget, bars[6])
- print "getBarMinMax: " + str(minmax)
+ print("getBarMinMax: " + str(minmax))
minmax = (0, (b * 100) + 100)
karamba.setBarMinMax(widget, bars[6], minmax[0], minmax[1])
# Sensor
sensor = karamba.getBarSensor(widget, bars[4])
- print "getSensor: " + str(sensor)
+ print("getSensor: " + str(sensor))
if(b):
karamba.setBarSensor(widget, bars[4], 'SENSOR=SENSOR TYPE="cpu_temp"')
else:
@@ -90,4 +90,4 @@ def widgetMouseMoved(widget, x, y, button):
pass
# This will be printed when the widget loads.
-print "Loaded Bar test python extension!"
+print("Loaded Bar test python extension!")