summaryrefslogtreecommitdiffstats
path: root/superkaramba/examples/graph
diff options
context:
space:
mode:
Diffstat (limited to 'superkaramba/examples/graph')
-rw-r--r--superkaramba/examples/graph/graph.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/superkaramba/examples/graph/graph.py b/superkaramba/examples/graph/graph.py
index 5798612..56beab1 100644
--- a/superkaramba/examples/graph/graph.py
+++ b/superkaramba/examples/graph/graph.py
@@ -28,20 +28,20 @@ def widgetUpdated(widget):
if(graphs[0]):
karamba.deleteGraph(widget, graphs[0])
graphs[0] = 0
- print "Deleted graph."
+ print("Deleted graph.")
else:
graphs[0] = karamba.createGraph(widget, 0, 20, 400, 30, 400)
- print "Created graph: " + str(graphs[0])
+ print("Created graph: " + str(graphs[0]))
# size & resize
size = karamba.getGraphSize(widget, graphs[1])
- print "getGraphSize: " + str(size)
+ print("getGraphSize: " + str(size))
size = ((b * 200) + 200, size[1])
karamba.resizeGraph(widget, graphs[1], size[0], size[1])
# pos & move
pos = karamba.getGraphPos(widget, graphs[2])
- print "getGraphPos: " + str(pos)
+ print("getGraphPos: " + str(pos))
pos = (b * 200, pos[1])
karamba.moveGraph(widget, graphs[2], pos[0], pos[1])
@@ -53,7 +53,7 @@ def widgetUpdated(widget):
# Sensor
sensor = karamba.getGraphSensor(widget, graphs[4])
- print "getSensor: " + str(sensor)
+ print("getSensor: " + str(sensor))
if(b):
karamba.setGraphSensor(widget, graphs[4], 'SENSOR=NETWORK FORMAT="%in"')
else:
@@ -61,19 +61,19 @@ def widgetUpdated(widget):
# Min Max
minmax = karamba.getGraphMinMax(widget, graphs[5])
- print "getGraphMinMax: " + str(minmax)
+ print("getGraphMinMax: " + str(minmax))
minmax = (0, (b * 25) + 25)
karamba.setGraphMinMax(widget, graphs[5], minmax[0], minmax[1])
# Value
v = karamba.getGraphValue(widget, graphs[6])
- print "getGraphValue: ", v
+ print("getGraphValue: ", v)
v = (v + 1) % 30
karamba.setGraphValue(widget, graphs[6], v)
# Color
c = karamba.getGraphColor(widget, graphs[7])
- print "getGraphColor: ", c
+ print("getGraphColor: ", c)
r = (c[0] + 10) % 255
g = (c[1] + 10) % 255
bl = (c[2] + 10) % 255
@@ -86,4 +86,4 @@ def widgetMouseMoved(widget, x, y, button):
pass
# This will be printed when the widget loads.
-print "Loaded Graph test python extension!"
+print("Loaded Graph test python extension!")