summaryrefslogtreecommitdiffstats
path: root/Tools/unicode/listcodecs.py
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/unicode/listcodecs.py')
-rw-r--r--Tools/unicode/listcodecs.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Tools/unicode/listcodecs.py b/Tools/unicode/listcodecs.py
index 82c6421..19d21e1 100644
--- a/Tools/unicode/listcodecs.py
+++ b/Tools/unicode/listcodecs.py
@@ -22,12 +22,12 @@ def listcodecs(dir):
except LookupError:
# Codec not found
continue
- except Exception as reason:
+ except Exception, reason:
# Probably an error from importing the codec; still it's
# a valid code name
if _debug:
- print('* problem importing codec %r: %s' % \
- (name, reason))
+ print '* problem importing codec %r: %s' % \
+ (name, reason)
names.append(name)
return names
@@ -35,7 +35,7 @@ def listcodecs(dir):
if __name__ == '__main__':
names = listcodecs(encodings.__path__[0])
names.sort()
- print('all_codecs = [')
+ print 'all_codecs = ['
for name in names:
- print(' %r,' % name)
- print(']')
+ print ' %r,' % name
+ print ']'