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/freeze/parsesetup.py b/Tools/freeze/parsesetup.py
index 7a6b72e..2b9123e 100644
--- a/Tools/freeze/parsesetup.py
+++ b/Tools/freeze/parsesetup.py
@@ -1,7 +1,6 @@
 # Parse Makefiles and Python Setup(.in) files.
 
 import re
-import string
 
 
 # Extract variable definitions from a Makefile.
@@ -29,10 +28,10 @@
 				continue
 			(name, value) = matchobj.group(1, 2)
 			# Strip trailing comment
-			i = string.find(value, '#')
+			i = value.find('#')
 			if i >= 0:
 				value = value[:i]
-			value = string.strip(value)
+			value = value.strip()
 			variables[name] = value
 	finally:
 		fp.close()
@@ -60,7 +59,7 @@
 			if not line:
 				break
 			# Strip comments
-			i = string.find(line, '#')
+			i = line.find('#')
 			if i >= 0:
 				line = line[:i]
 			if line.endswith('\\\n'):
@@ -69,9 +68,9 @@
 			matchobj = setupvardef.match(line)
 			if matchobj:
 				(name, value) = matchobj.group(1, 2)
-				variables[name] = string.strip(value)
+				variables[name] = value.strip()
 			else:
-				words = string.split(line)
+				words = line.split()
 				if words:
 					modules[words[0]] = words[1:]
 	finally: