diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2022-11-11 17:41:30 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2022-11-13 12:09:49 +0900 |
commit | da9cd0c056c8275033fca84a1c8d49a8edb0c8ee (patch) | |
tree | 2521f74c0b2868d82518e13053fb01cc179e9a23 /superkaramba/examples/richtext/rtext.py | |
parent | 5dab6232ef3b3715630cf88eb40c4c6021e65f07 (diff) | |
download | tdeutils-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/richtext/rtext.py')
-rw-r--r-- | superkaramba/examples/richtext/rtext.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/superkaramba/examples/richtext/rtext.py b/superkaramba/examples/richtext/rtext.py index 68c800a..7d30776 100644 --- a/superkaramba/examples/richtext/rtext.py +++ b/superkaramba/examples/richtext/rtext.py @@ -38,19 +38,19 @@ def widgetUpdated(widget): karamba.moveRichText(widget, texts[0], 0, 20) karamba.resizeRichText(widget, texts[0], 200, 20) pos = karamba.getRichTextPos(widget, texts[0]) - print "--getRichTextPos: " + str(pos) + print("--getRichTextPos: " + str(pos)) size = karamba.getRichTextSize(widget, texts[0]) - print "--getRichTextSize: " + str(size) + print("--getRichTextSize: " + str(size)) # size & resize size = karamba.getRichTextSize(widget, texts[1]) - print "getRichTextSize: " + str(size) + print("getRichTextSize: " + str(size)) size = ((b * 200) + 200, size[1]) karamba.resizeRichText(widget, texts[1], size[0], size[1]) # pos & move pos = karamba.getRichTextPos(widget, texts[2]) - print "getRichTextPos: " + str(pos) + print("getRichTextPos: " + str(pos)) pos = (b * 200, pos[1]) karamba.moveRichText(widget, texts[2], pos[0], pos[1]) @@ -62,7 +62,7 @@ def widgetUpdated(widget): # Sensor sensor = karamba.getRichTextSensor(widget, texts[4]) - print "getSensor: " + str(sensor) + print("getSensor: " + str(sensor)) if(b): karamba.setRichTextSensor(widget, texts[4], 'SENSOR=SENSOR TYPE="cpu_temp"') else: @@ -70,19 +70,19 @@ def widgetUpdated(widget): # Value v = karamba.getRichTextValue(widget, texts[5]) - print "getRichTextValue: ", v - v += '.' + print("getRichTextValue: ", v) + v += '.'.encode('utf-8') karamba.changeRichText(widget, texts[5], v) # Font size v = karamba.getRichTextFontSize(widget, texts[7]) - print "getRichTextFontSize: ", v + print("getRichTextFontSize: ", v) v = 10 + ((v-10)+1)%10; karamba.changeRichTextSize(widget, texts[7], v) # RichText Font v = karamba.getRichTextFont(widget, texts[9]) - print "getRichTextFont: ", v + print("getRichTextFont: ", v) if(b): v = 'Bitstream Vera Sans' else: @@ -96,4 +96,4 @@ def widgetMouseMoved(widget, x, y, button): pass # This will be printed when the widget loads. -print "Loaded RichText test python extension!" +print("Loaded RichText test python extension!") |