summaryrefslogtreecommitdiff
path: root/Lib/lib-tk
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/lib-tk')
-rw-r--r--Lib/lib-tk/FileDialog.py2
-rwxr-xr-xLib/lib-tk/Tix.py4
-rw-r--r--Lib/lib-tk/Tkinter.py12
-rw-r--r--Lib/lib-tk/turtle.py10
4 files changed, 14 insertions, 14 deletions
diff --git a/Lib/lib-tk/FileDialog.py b/Lib/lib-tk/FileDialog.py
index 323dc29704..5e848daa73 100644
--- a/Lib/lib-tk/FileDialog.py
+++ b/Lib/lib-tk/FileDialog.py
@@ -244,7 +244,7 @@ class SaveFileDialog(FileDialog):
return
d = Dialog(self.top,
title="Overwrite Existing File Question",
- text="Overwrite existing file %s?" % `file`,
+ text="Overwrite existing file %r?" % (file,),
bitmap='questhead',
default=1,
strings=("Yes", "Cancel"))
diff --git a/Lib/lib-tk/Tix.py b/Lib/lib-tk/Tix.py
index 99731cdcbf..91145386d3 100755
--- a/Lib/lib-tk/Tix.py
+++ b/Lib/lib-tk/Tix.py
@@ -374,9 +374,9 @@ class TixWidget(Tkinter.Widget):
if option == '':
return
elif not isinstance(option, StringType):
- option = `option`
+ option = repr(option)
if not isinstance(value, StringType):
- value = `value`
+ value = repr(value)
names = self._subwidget_names()
for name in names:
self.tk.call(name, 'configure', '-' + option, value)
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py
index b5b0af3a9f..67e942e18a 100644
--- a/Lib/lib-tk/Tkinter.py
+++ b/Lib/lib-tk/Tkinter.py
@@ -177,7 +177,7 @@ class Variable:
master = _default_root
self._master = master
self._tk = master.tk
- self._name = 'PY_VAR' + `_varnum`
+ self._name = 'PY_VAR' + repr(_varnum)
_varnum = _varnum + 1
self.set(self._default)
def __del__(self):
@@ -1022,7 +1022,7 @@ class Misc:
be executed. An optional function SUBST can
be given which will be executed before FUNC."""
f = CallWrapper(func, subst, self).__call__
- name = `id(f)`
+ name = repr(id(f))
try:
func = func.im_func
except AttributeError:
@@ -1810,7 +1810,7 @@ class BaseWidget(Misc):
name = cnf['name']
del cnf['name']
if not name:
- name = `id(self)`
+ name = repr(id(self))
self._name = name
if master._w=='.':
self._w = '.' + name
@@ -1957,9 +1957,9 @@ def AtSelLast():
return 'sel.last'
def At(x, y=None):
if y is None:
- return '@' + `x`
+ return '@%r' % (x,)
else:
- return '@' + `x` + ',' + `y`
+ return '@%r,%r' % (x, y)
class Canvas(Widget):
"""Canvas widget to display graphical elements like lines or text."""
@@ -3118,7 +3118,7 @@ class Image:
self.tk = master.tk
if not name:
Image._last_id += 1
- name = "pyimage" +`Image._last_id` # tk itself would use image<x>
+ name = "pyimage%r" % (Image._last_id,) # tk itself would use image<x>
# The following is needed for systems where id(x)
# can return a negative number, such as Linux/m68k:
if name[0] == '-': name = '_' + name[1:]
diff --git a/Lib/lib-tk/turtle.py b/Lib/lib-tk/turtle.py
index b56d91c83f..a395613c7a 100644
--- a/Lib/lib-tk/turtle.py
+++ b/Lib/lib-tk/turtle.py
@@ -95,18 +95,18 @@ class RawPen:
try:
id = self._canvas.create_line(0, 0, 0, 0, fill=color)
except Tkinter.TclError:
- raise Error, "bad color string: %s" % `color`
+ raise Error, "bad color string: %r" % (color,)
self._set_color(color)
return
try:
r, g, b = color
except:
- raise Error, "bad color sequence: %s" % `color`
+ raise Error, "bad color sequence: %r" % (color,)
else:
try:
r, g, b = args
except:
- raise Error, "bad color arguments: %s" % `args`
+ raise Error, "bad color arguments: %r" % (args,)
assert 0 <= r <= 1
assert 0 <= g <= 1
assert 0 <= b <= 1
@@ -240,12 +240,12 @@ class RawPen:
try:
x, y = args[0]
except:
- raise Error, "bad point argument: %s" % `args[0]`
+ raise Error, "bad point argument: %r" % (args[0],)
else:
try:
x, y = args
except:
- raise Error, "bad coordinates: %s" % `args[0]`
+ raise Error, "bad coordinates: %r" % (args[0],)
x0, y0 = self._origin
self._goto(x0+x, y0-y)