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/makefreeze.py b/Tools/freeze/makefreeze.py
index 3888050..29a6ad6 100644
--- a/Tools/freeze/makefreeze.py
+++ b/Tools/freeze/makefreeze.py
@@ -1,5 +1,4 @@
import marshal
-import string
import bkfile
@@ -38,7 +37,7 @@
mods.sort()
for mod in mods:
m = dict[mod]
- mangled = string.join(string.split(mod, "."), "__")
+ mangled = "__".join(mod.split("."))
if m.__code__:
file = 'M_' + mangled + '.c'
outfp = bkfile.open(base + file, 'w')
@@ -88,4 +87,4 @@
## def writecode(outfp, mod, str):
## outfp.write('unsigned char M_%s[%d] = "%s";\n' % (mod, len(str),
-## string.join(map(lambda s: `s`[1:-1], string.split(str, '"')), '\\"')))
+## '\\"'.join(map(lambda s: `s`[1:-1], str.split('"')))))