summaryrefslogtreecommitdiffstats
path: root/Tools/freeze/makefreeze.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-06-12 00:28:30 (GMT)
committerGuido van Rossum <guido@python.org>2007-06-12 00:28:30 (GMT)
commit5397039504fa45f7a41b8afe5f0cb485ad4dbcf1 (patch)
treee5b8d338ccca2ffe33bd31d793d31536997d463d /Tools/freeze/makefreeze.py
parent0aa35f8709fa5c182254487c609ac4a3ba929ba6 (diff)
downloadcpython-5397039504fa45f7a41b8afe5f0cb485ad4dbcf1.zip
cpython-5397039504fa45f7a41b8afe5f0cb485ad4dbcf1.tar.gz
cpython-5397039504fa45f7a41b8afe5f0cb485ad4dbcf1.tar.bz2
Minimal changes to make the "freeze" tool work again.
There are other issues left, but these were basics (e.g. keys().sort()).
Diffstat (limited to 'Tools/freeze/makefreeze.py')
-rw-r--r--Tools/freeze/makefreeze.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/Tools/freeze/makefreeze.py b/Tools/freeze/makefreeze.py
index e359db9..4cd1e96 100644
--- a/Tools/freeze/makefreeze.py
+++ b/Tools/freeze/makefreeze.py
@@ -33,8 +33,7 @@ def makefreeze(base, dict, debug=0, entry_point=None, fail_import=()):
if entry_point is None: entry_point = default_entry_point
done = []
files = []
- mods = dict.keys()
- mods.sort()
+ mods = sorted(dict.keys())
for mod in mods:
m = dict[mod]
mangled = "__".join(mod.split("."))
@@ -81,8 +80,8 @@ def writecode(outfp, mod, str):
outfp.write('unsigned char M_%s[] = {' % mod)
for i in range(0, len(str), 16):
outfp.write('\n\t')
- for c in str[i:i+16]:
- outfp.write('%d,' % ord(c))
+ for c in bytes(str[i:i+16]):
+ outfp.write('%d,' % c)
outfp.write('\n};\n')
## def writecode(outfp, mod, str):