Apply diff2.txt from SF patch http://www.python.org/sf/572113
(with one small bugfix in bgen/bgen/scantools.py)

This replaces string module functions with string methods
for the stuff in the Tools directory. Several uses of
string.letters etc. are still remaining.
diff --git a/Tools/idle/AutoIndent.py b/Tools/idle/AutoIndent.py
index f8bb847..7bc195b 100644
--- a/Tools/idle/AutoIndent.py
+++ b/Tools/idle/AutoIndent.py
@@ -1,4 +1,3 @@
-import string
 #from Tkinter import TclError
 #import tkMessageBox
 #import tkSimpleDialog
@@ -168,15 +167,15 @@
             return "break"
         # Ick.  It may require *inserting* spaces if we back up over a
         # tab character!  This is written to be clear, not fast.
-        expand, tabwidth = string.expandtabs, self.tabwidth
-        have = len(expand(chars, tabwidth))
+        tabwidth = self.tabwidth
+        have = len(chars.expandtabs(tabwidth))
         assert have > 0
         want = ((have - 1) // self.indentwidth) * self.indentwidth
         ncharsdeleted = 0
         while 1:
             chars = chars[:-1]
             ncharsdeleted = ncharsdeleted + 1
-            have = len(expand(chars, tabwidth))
+            have = len(chars.expandtabs(tabwidth))
             if have <= want or chars[-1] not in " \t":
                 break
         text.undo_block_start()
@@ -210,8 +209,7 @@
                 if self.usetabs:
                     pad = '\t'
                 else:
-                    effective = len(string.expandtabs(prefix,
-                                                      self.tabwidth))
+                    effective = len(prefix.expandtabs(self.tabwidth))
                     n = self.indentwidth
                     pad = ' ' * (n - effective % n)
                 text.insert("insert", pad)
@@ -376,7 +374,7 @@
         head, tail, chars, lines = self.get_region()
         tabwidth = self._asktabwidth()
         for pos in range(len(lines)):
-            lines[pos] = string.expandtabs(lines[pos], tabwidth)
+            lines[pos] = lines[pos].expandtabs(tabwidth)
         self.set_region(head, tail, chars, lines)
 
     def toggle_tabs_event(self, event):
@@ -417,12 +415,12 @@
             head = text.index("insert linestart")
             tail = text.index("insert lineend +1c")
         chars = text.get(head, tail)
-        lines = string.split(chars, "\n")
+        lines = chars.split("\n")
         return head, tail, chars, lines
 
     def set_region(self, head, tail, chars, lines):
         text = self.text
-        newchars = string.join(lines, "\n")
+        newchars = "\n".join(lines)
         if newchars == chars:
             text.bell()
             return