running libfuturize.fixes.fix_print_with_import

This commit is contained in:
ilvalle
2016-05-30 21:23:40 +02:00
parent 36ca754c77
commit 48e10a3793
36 changed files with 240 additions and 204 deletions
+8 -7
View File
@@ -2,6 +2,7 @@
Created by Massimo Di Pierro
License BSD
"""
from __future__ import print_function
import subprocess
import os
@@ -22,7 +23,7 @@ def removeall(path):
__func__(path)
except OSError as xxx_todo_changeme:
(errno, strerror) = xxx_todo_changeme.args
print ERROR_STR % {'path': path, 'error': strerror}
print(ERROR_STR % {'path': path, 'error': strerror})
files = [path]
@@ -113,10 +114,10 @@ if __name__ == '__main__':
if sys.argv[1:2] == ['-h']:
data, warnings, errors = markmin2pdf(markmin2html.__doc__)
if errors:
print 'ERRORS:' + '\n'.join(errors)
print 'WARNGINS:' + '\n'.join(warnings)
print('ERRORS:' + '\n'.join(errors))
print('WARNGINS:' + '\n'.join(warnings))
else:
print data
print(data)
elif len(sys.argv) > 1:
fargv = open(sys.argv[1], 'rb')
try:
@@ -124,9 +125,9 @@ if __name__ == '__main__':
finally:
fargv.close()
if errors:
print 'ERRORS:' + '\n'.join(errors)
print 'WARNGINS:' + '\n'.join(warnings)
print('ERRORS:' + '\n'.join(errors))
print('WARNGINS:' + '\n'.join(warnings))
else:
print data
print(data)
else:
doctest.testmod()