summaryrefslogtreecommitdiffstats
path: root/Tools/unicode/gencjkcodecs.py
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/unicode/gencjkcodecs.py')
-rw-r--r--Tools/unicode/gencjkcodecs.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Tools/unicode/gencjkcodecs.py b/Tools/unicode/gencjkcodecs.py
index 45866bf..975c19c 100644
--- a/Tools/unicode/gencjkcodecs.py
+++ b/Tools/unicode/gencjkcodecs.py
@@ -55,14 +55,13 @@ def getregentry():
""")
def gencodecs(prefix):
- for loc, encodings in codecs.items():
+ for loc, encodings in codecs.iteritems():
for enc in encodings:
code = TEMPLATE.substitute(ENCODING=enc.upper(),
encoding=enc.lower(),
owner=loc)
codecpath = os.path.join(prefix, enc + '.py')
- with open(codecpath, 'w') as f:
- f.write(code)
+ open(codecpath, 'w').write(code)
if __name__ == '__main__':
import sys