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.)
This commit is contained in:
Guido van Rossum 2007-02-09 05:37:30 +00:00
parent 452bf519a7
commit be19ed77dd
331 changed files with 2567 additions and 2648 deletions

View file

@ -75,7 +75,7 @@ def Message(msg, id=260, ok=None):
_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 @@ def AskString(prompt, default = "", id=261, ok=None, cancel=None):
_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 @@ def AskPassword(prompt, default='', id=264, ok=None, cancel=None):
_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 @@ def AskYesNoCancel(question, default = 0, yes=None, no=None, cancel=None, id=262
_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 @@ def GetArgv(optionlist=None, commandlist=None, addoldfile=1, addnewfile=1, addfo
_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 @@ def test():
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: