Fix most trivially-findable print statements.
There's one major and one minor category still unfixed:
doctests are the major category (and I hope to be able to augment the
refactoring tool to refactor bona fide doctests soon);
other code generating print statements in strings is the minor category.
(Oh, and I don't know if the compiler package works.)
diff --git a/Lib/test/test_pkg.py b/Lib/test/test_pkg.py
index c365742..79c9098 100644
--- a/Lib/test/test_pkg.py
+++ b/Lib/test/test_pkg.py
@@ -18,7 +18,7 @@
if contents is None:
mkdir(fullname)
else:
- if verbose: print "write", fullname
+ if verbose: print("write", fullname)
f = open(fullname, "w")
f.write(contents)
if contents and contents[-1] != '\n':
@@ -26,7 +26,7 @@
f.close()
def mkdir(x):
- if verbose: print "mkdir", x
+ if verbose: print("mkdir", x)
os.mkdir(x)
def cleanout(root):
@@ -40,7 +40,7 @@
rmdir(root)
def rmdir(x):
- if verbose: print "rmdir", x
+ if verbose: print("rmdir", x)
os.rmdir(x)
def fixdir(lst):
@@ -61,7 +61,7 @@
os.close(fd)
try:
sys.path.insert(0, root)
- if verbose: print "sys.path =", sys.path
+ if verbose: print("sys.path =", sys.path)
try:
execfile(fname, globals(), {})
except:
@@ -242,9 +242,9 @@
for name, hier, code in tests:
if args and name not in args:
- print "skipping test", name
+ print("skipping test", name)
continue
- print "running test", name
+ print("running test", name)
runtest(hier, code)
# Test