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/plat-mac/EasyDialogs.py b/Lib/plat-mac/EasyDialogs.py
index 340e3ed..3c92011 100644
--- a/Lib/plat-mac/EasyDialogs.py
+++ b/Lib/plat-mac/EasyDialogs.py
@@ -75,7 +75,7 @@
_interact()
d = GetNewDialog(id, -1)
if not d:
- print "EasyDialogs: Can't get DLOG resource with id =", id, " (missing resource file?)"
+ print("EasyDialogs: Can't get DLOG resource with id =", id, " (missing resource file?)")
return
h = d.GetDialogItemAsControl(2)
SetDialogItemText(h, lf2cr(msg))
@@ -108,7 +108,7 @@
_interact()
d = GetNewDialog(id, -1)
if not d:
- print "EasyDialogs: Can't get DLOG resource with id =", id, " (missing resource file?)"
+ print("EasyDialogs: Can't get DLOG resource with id =", id, " (missing resource file?)")
return
h = d.GetDialogItemAsControl(3)
SetDialogItemText(h, lf2cr(prompt))
@@ -150,7 +150,7 @@
_interact()
d = GetNewDialog(id, -1)
if not d:
- print "EasyDialogs: Can't get DLOG resource with id =", id, " (missing resource file?)"
+ print("EasyDialogs: Can't get DLOG resource with id =", id, " (missing resource file?)")
return
h = d.GetDialogItemAsControl(3)
SetDialogItemText(h, lf2cr(prompt))
@@ -194,7 +194,7 @@
_interact()
d = GetNewDialog(id, -1)
if not d:
- print "EasyDialogs: Can't get DLOG resource with id =", id, " (missing resource file?)"
+ print("EasyDialogs: Can't get DLOG resource with id =", id, " (missing resource file?)")
return
# Button assignments:
# 1 = default (invisible)
@@ -429,7 +429,7 @@
_interact()
d = GetNewDialog(id, -1)
if not d:
- print "EasyDialogs: Can't get DLOG resource with id =", id, " (missing resource file?)"
+ print("EasyDialogs: Can't get DLOG resource with id =", id, " (missing resource file?)")
return
# h = d.GetDialogItemAsControl(3)
# SetDialogItemText(h, lf2cr(prompt))
@@ -791,7 +791,7 @@
argv = GetArgv(optionlist=optionlist, commandlist=commandlist, addoldfile=0)
Message("Command line: %s"%' '.join(argv))
for i in range(len(argv)):
- print 'arg[%d] = %r' % (i, argv[i])
+ print('arg[%d] = %r' % (i, argv[i]))
ok = AskYesNoCancel("Do you want to proceed?")
ok = AskYesNoCancel("Do you want to identify?", yes="Identify", no="No")
if ok > 0: