diff options
author | Guido van Rossum <guido@python.org> | 2007-02-09 05:37:30 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-02-09 05:37:30 (GMT) |
commit | be19ed77ddb047e02fe94d142181062af6d99dcc (patch) | |
tree | 70f214e06554046fcccbadeb78665f25e07ce965 /Lib/lib-tk | |
parent | 452bf519a70c3db0e7f0d2540b1bfb07d9085583 (diff) | |
download | cpython-be19ed77ddb047e02fe94d142181062af6d99dcc.zip cpython-be19ed77ddb047e02fe94d142181062af6d99dcc.tar.gz cpython-be19ed77ddb047e02fe94d142181062af6d99dcc.tar.bz2 |
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.)
Diffstat (limited to 'Lib/lib-tk')
-rw-r--r-- | Lib/lib-tk/Dialog.py | 2 | ||||
-rw-r--r-- | Lib/lib-tk/FileDialog.py | 2 | ||||
-rw-r--r-- | Lib/lib-tk/SimpleDialog.py | 2 | ||||
-rw-r--r-- | Lib/lib-tk/Tkinter.py | 2 | ||||
-rw-r--r-- | Lib/lib-tk/tkColorChooser.py | 2 | ||||
-rw-r--r-- | Lib/lib-tk/tkFileDialog.py | 8 | ||||
-rw-r--r-- | Lib/lib-tk/tkFont.py | 20 | ||||
-rw-r--r-- | Lib/lib-tk/tkMessageBox.py | 16 | ||||
-rw-r--r-- | Lib/lib-tk/tkSimpleDialog.py | 6 |
9 files changed, 30 insertions, 30 deletions
diff --git a/Lib/lib-tk/Dialog.py b/Lib/lib-tk/Dialog.py index b52e5b4..0ddfc73 100644 --- a/Lib/lib-tk/Dialog.py +++ b/Lib/lib-tk/Dialog.py @@ -36,7 +36,7 @@ def _test(): 'strings': ('Save File', 'Discard Changes', 'Return to Editor')}) - print d.num + print(d.num) if __name__ == '__main__': diff --git a/Lib/lib-tk/FileDialog.py b/Lib/lib-tk/FileDialog.py index 06ce2b9..9ded88b 100644 --- a/Lib/lib-tk/FileDialog.py +++ b/Lib/lib-tk/FileDialog.py @@ -267,7 +267,7 @@ def test(): loadfile = fd.go(key="test") fd = SaveFileDialog(root) savefile = fd.go(key="test") - print loadfile, savefile + print(loadfile, savefile) if __name__ == '__main__': diff --git a/Lib/lib-tk/SimpleDialog.py b/Lib/lib-tk/SimpleDialog.py index cb08318..fa2d1ad 100644 --- a/Lib/lib-tk/SimpleDialog.py +++ b/Lib/lib-tk/SimpleDialog.py @@ -102,7 +102,7 @@ if __name__ == '__main__': default=0, cancel=2, title="Test Dialog") - print d.go() + print(d.go()) t = Button(root, text='Test', command=doit) t.pack() q = Button(root, text='Quit', command=t.quit) diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py index 157b066..7753f2d 100644 --- a/Lib/lib-tk/Tkinter.py +++ b/Lib/lib-tk/Tkinter.py @@ -86,7 +86,7 @@ def _cnfmerge(cnfs): try: cnf.update(c) except (AttributeError, TypeError) as msg: - print "_cnfmerge: fallback due to:", msg + print("_cnfmerge: fallback due to:", msg) for k, v in c.items(): cnf[k] = v return cnf diff --git a/Lib/lib-tk/tkColorChooser.py b/Lib/lib-tk/tkColorChooser.py index a55a797..e3593ed 100644 --- a/Lib/lib-tk/tkColorChooser.py +++ b/Lib/lib-tk/tkColorChooser.py @@ -67,4 +67,4 @@ def askcolor(color = None, **options): if __name__ == "__main__": - print "color", askcolor() + print("color", askcolor()) diff --git a/Lib/lib-tk/tkFileDialog.py b/Lib/lib-tk/tkFileDialog.py index a35feed..0f2065d 100644 --- a/Lib/lib-tk/tkFileDialog.py +++ b/Lib/lib-tk/tkFileDialog.py @@ -204,12 +204,12 @@ if __name__ == "__main__": fp=open(openfilename,"r") fp.close() except: - print "Could not open File: " - print sys.exc_info()[1] + print("Could not open File: ") + print(sys.exc_info()[1]) - print "open", openfilename.encode(enc) + print("open", openfilename.encode(enc)) # dialog for saving files saveasfilename=asksaveasfilename() - print "saveas", saveasfilename.encode(enc) + print("saveas", saveasfilename.encode(enc)) diff --git a/Lib/lib-tk/tkFont.py b/Lib/lib-tk/tkFont.py index 15dea2e..ce50397 100644 --- a/Lib/lib-tk/tkFont.py +++ b/Lib/lib-tk/tkFont.py @@ -185,22 +185,22 @@ if __name__ == "__main__": # create a font f = Font(family="times", size=30, weight=NORMAL) - print f.actual() - print f.actual("family") - print f.actual("weight") + print(f.actual()) + print(f.actual("family")) + print(f.actual("weight")) - print f.config() - print f.cget("family") - print f.cget("weight") + print(f.config()) + print(f.cget("family")) + print(f.cget("weight")) - print names() + print(names()) - print f.measure("hello"), f.metrics("linespace") + print(f.measure("hello"), f.metrics("linespace")) - print f.metrics() + print(f.metrics()) f = Font(font=("Courier", 20, "bold")) - print f.measure("hello"), f.metrics("linespace") + print(f.measure("hello"), f.metrics("linespace")) w = Tkinter.Label(root, text="Hello, world", font=f) w.pack() diff --git a/Lib/lib-tk/tkMessageBox.py b/Lib/lib-tk/tkMessageBox.py index d14ca86..94ba788b 100644 --- a/Lib/lib-tk/tkMessageBox.py +++ b/Lib/lib-tk/tkMessageBox.py @@ -122,11 +122,11 @@ def askretrycancel(title=None, message=None, **options): if __name__ == "__main__": - print "info", showinfo("Spam", "Egg Information") - print "warning", showwarning("Spam", "Egg Warning") - print "error", showerror("Spam", "Egg Alert") - print "question", askquestion("Spam", "Question?") - print "proceed", askokcancel("Spam", "Proceed?") - print "yes/no", askyesno("Spam", "Got it?") - print "yes/no/cancel", askyesnocancel("Spam", "Want it?") - print "try again", askretrycancel("Spam", "Try again?") + print("info", showinfo("Spam", "Egg Information")) + print("warning", showwarning("Spam", "Egg Warning")) + print("error", showerror("Spam", "Egg Alert")) + print("question", askquestion("Spam", "Question?")) + print("proceed", askokcancel("Spam", "Proceed?")) + print("yes/no", askyesno("Spam", "Got it?")) + print("yes/no/cancel", askyesnocancel("Spam", "Want it?")) + print("try again", askretrycancel("Spam", "Try again?")) diff --git a/Lib/lib-tk/tkSimpleDialog.py b/Lib/lib-tk/tkSimpleDialog.py index 8d35db2..f4ed77a 100644 --- a/Lib/lib-tk/tkSimpleDialog.py +++ b/Lib/lib-tk/tkSimpleDialog.py @@ -315,6 +315,6 @@ if __name__ == "__main__": root = Tk() root.update() - print askinteger("Spam", "Egg count", initialvalue=12*12) - print askfloat("Spam", "Egg weight\n(in tons)", minvalue=1, maxvalue=100) - print askstring("Spam", "Egg label") + print(askinteger("Spam", "Egg count", initialvalue=12*12)) + print(askfloat("Spam", "Egg weight\n(in tons)", minvalue=1, maxvalue=100)) + print(askstring("Spam", "Egg label")) |