diff options
Diffstat (limited to 'superkaramba/examples/text')
-rw-r--r-- | superkaramba/examples/text/text.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/superkaramba/examples/text/text.py b/superkaramba/examples/text/text.py index 4612dd5..b5ca3d7 100644 --- a/superkaramba/examples/text/text.py +++ b/superkaramba/examples/text/text.py @@ -38,13 +38,13 @@ def widgetUpdated(widget): # size & resize size = karamba.getTextSize(widget, texts[1]) - print "getTextSize: " + str(size) + print("getTextSize: " + str(size)) size = ((b * 200) + 200, size[1]) karamba.resizeText(widget, texts[1], size[0], size[1]) # pos & move pos = karamba.getTextPos(widget, texts[2]) - print "getTextPos: " + str(pos) + print("getTextPos: " + str(pos)) pos = (b * 200, pos[1]) karamba.moveText(widget, texts[2], pos[0], pos[1]) @@ -56,7 +56,7 @@ def widgetUpdated(widget): # Sensor sensor = karamba.getTextSensor(widget, texts[4]) - print "getSensor: " + str(sensor) + print("getSensor: " + str(sensor)) if(b): karamba.setTextSensor(widget, texts[4], 'SENSOR=SENSOR TYPE="cpu_temp"') else: @@ -64,30 +64,30 @@ def widgetUpdated(widget): # Value v = karamba.getTextValue(widget, texts[5]) - print "getTextValue: ", v + print("getTextValue: ", v) v += '.' karamba.changeText(widget, texts[5], v) # Shadow v = karamba.getTextShadow(widget, texts[6]) - print "getTextShadow: ", v + print("getTextShadow: ", v) v = (v+1)%10; karamba.changeTextShadow(widget, texts[6], v) # Font size v = karamba.getTextFontSize(widget, texts[7]) - print "getTextFontSize: ", v + print("getTextFontSize: ", v) v = 10 + ((v-10)+1)%10; karamba.changeTextSize(widget, texts[7], v) # Text color v = karamba.getTextColor(widget, texts[8]) - print "getTextColor: ", v + print("getTextColor: ", v) karamba.changeTextColor(widget, texts[8], b*255, b*255, b*255) # Text Font v = karamba.getTextFont(widget, texts[9]) - print "getTextFont: ", v + print("getTextFont: ", v) if(b): v = 'Bitstream Vera Sans' else: @@ -97,7 +97,7 @@ def widgetUpdated(widget): # Text Alignment a = (a+1)%3 v = karamba.getTextAlign(widget, texts[10]) - print "getTextAlign: ", v + print("getTextAlign: ", v) karamba.setTextAlign(widget, texts[10], align[a]) def widgetClicked(widget, x, y, button): @@ -107,4 +107,4 @@ def widgetMouseMoved(widget, x, y, button): pass # This will be printed when the widget loads. -print "Loaded Text test python extension!" +print("Loaded Text test python extension!") |