diff options
author | Collin Winter <collinw@gmail.com> | 2007-08-03 17:06:41 (GMT) |
---|---|---|
committer | Collin Winter <collinw@gmail.com> | 2007-08-03 17:06:41 (GMT) |
commit | 6afaeb757af0dbd8508a0f2352ade61e41bec84c (patch) | |
tree | f1b31bc7138b17ff39791bbb45aa81583c3b6e46 /Tools/unicode/gencodec.py | |
parent | e5d0e8431f929cad2da77b63fe1b7dc0ff21a428 (diff) | |
download | cpython-6afaeb757af0dbd8508a0f2352ade61e41bec84c.zip cpython-6afaeb757af0dbd8508a0f2352ade61e41bec84c.tar.gz cpython-6afaeb757af0dbd8508a0f2352ade61e41bec84c.tar.bz2 |
Convert print statements to function calls in Tools/.
Diffstat (limited to 'Tools/unicode/gencodec.py')
-rw-r--r-- | Tools/unicode/gencodec.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Tools/unicode/gencodec.py b/Tools/unicode/gencodec.py index 47d81eb..a4d88e0 100644 --- a/Tools/unicode/gencodec.py +++ b/Tools/unicode/gencodec.py @@ -131,7 +131,7 @@ def hexrepr(t, precision=4): return '(' + ', '.join(['0x%0*X' % (precision, item) for item in t]) + ')' except TypeError as why: - print '* failed to convert %r: %s' % (t, why) + print('* failed to convert %r: %s' % (t, why)) raise def python_mapdef_code(varname, map, comments=1, precisions=(2, 4)): @@ -383,18 +383,18 @@ def convertdir(dir, dirprefix='', nameprefix='', comments=1): name = nameprefix + name codefile = name + '.py' marshalfile = name + '.mapping' - print 'converting %s to %s and %s' % (mapname, + print('converting %s to %s and %s' % (mapname, dirprefix + codefile, - dirprefix + marshalfile) + dirprefix + marshalfile)) try: map = readmap(os.path.join(dir,mapname)) if not map: - print '* map is empty; skipping' + print('* map is empty; skipping') else: pymap(mappathname, map, dirprefix + codefile,name,comments) marshalmap(mappathname, map, dirprefix + marshalfile) except ValueError as why: - print '* conversion failed: %s' % why + print('* conversion failed: %s' % why) raise def rewritepythondir(dir, dirprefix='', comments=1): @@ -405,17 +405,17 @@ def rewritepythondir(dir, dirprefix='', comments=1): continue name = mapname[:-len('.mapping')] codefile = name + '.py' - print 'converting %s to %s' % (mapname, - dirprefix + codefile) + print('converting %s to %s' % (mapname, + dirprefix + codefile)) try: map = marshal.load(open(os.path.join(dir,mapname), 'rb')) if not map: - print '* map is empty; skipping' + print('* map is empty; skipping') else: pymap(mapname, map, dirprefix + codefile,name,comments) except ValueError as why: - print '* conversion failed: %s' % why + print('* conversion failed: %s' % why) if __name__ == '__main__': |