Replace backticks with repr() or "%r"
From SF patch #852334.
diff --git a/Mac/IDE scripts/Widget demos/KeyTester.py b/Mac/IDE scripts/Widget demos/KeyTester.py
index ec66966..a9f3140 100644
--- a/Mac/IDE scripts/Widget demos/KeyTester.py
+++ b/Mac/IDE scripts/Widget demos/KeyTester.py
@@ -4,7 +4,7 @@
# key callback function
def tester(char, event):
- text = `char` + "\r" + `ord(char)` + "\r" + hex(ord(char)) + "\r" + oct(ord(char))
+ text = "%r\r%d\r%s\r%s" % (char, ord(char), hex(ord(chart)), oct(ord(char)))
window.keys.set(text)
# close callback
diff --git a/Mac/IDE scripts/Widget demos/WidgetTest.py b/Mac/IDE scripts/Widget demos/WidgetTest.py
index f88b059..424e70d 100644
--- a/Mac/IDE scripts/Widget demos/WidgetTest.py
+++ b/Mac/IDE scripts/Widget demos/WidgetTest.py
@@ -79,7 +79,7 @@
if 0:
import time
for i in range(20):
- window.et2.set(`i`)
+ window.et2.set(repr(i))
#window.et2.SetPort()
#window.et2.draw()
time.sleep(0.1)