Replace backticks with repr() or "%r"

From SF patch #852334.
diff --git a/Lib/lib-tk/FileDialog.py b/Lib/lib-tk/FileDialog.py
index 323dc29..5e848da 100644
--- a/Lib/lib-tk/FileDialog.py
+++ b/Lib/lib-tk/FileDialog.py
@@ -244,7 +244,7 @@
                 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 99731cd..9114538 100755
--- a/Lib/lib-tk/Tix.py
+++ b/Lib/lib-tk/Tix.py
@@ -374,9 +374,9 @@
         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 b5b0af3..67e942e 100644
--- a/Lib/lib-tk/Tkinter.py
+++ b/Lib/lib-tk/Tkinter.py
@@ -177,7 +177,7 @@
             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 @@
         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 @@
             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 @@
     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 @@
         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 b56d91c..a395613 100644
--- a/Lib/lib-tk/turtle.py
+++ b/Lib/lib-tk/turtle.py
@@ -95,18 +95,18 @@
                 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 @@
             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)