diff options
author | Collin Winter <collinw@gmail.com> | 2007-07-17 20:59:35 (GMT) |
---|---|---|
committer | Collin Winter <collinw@gmail.com> | 2007-07-17 20:59:35 (GMT) |
commit | 6f2df4d5e193d54244b0c2de91ef0ab1604b9243 (patch) | |
tree | 5e172400da7561eb4bb8fafc62c8cab511d74dad /Demo/tkinter/matt | |
parent | a8c360ee76fb76902a2e2140fbb38d4b06b2d9fb (diff) | |
download | cpython-6f2df4d5e193d54244b0c2de91ef0ab1604b9243.zip cpython-6f2df4d5e193d54244b0c2de91ef0ab1604b9243.tar.gz cpython-6f2df4d5e193d54244b0c2de91ef0ab1604b9243.tar.bz2 |
Run 2to3 over the Demo/ directory to shut up parse errors from 2to3 about lingering print statements.
Diffstat (limited to 'Demo/tkinter/matt')
28 files changed, 43 insertions, 43 deletions
diff --git a/Demo/tkinter/matt/00-HELLO-WORLD.py b/Demo/tkinter/matt/00-HELLO-WORLD.py index 1c3151b..20a2050 100644 --- a/Demo/tkinter/matt/00-HELLO-WORLD.py +++ b/Demo/tkinter/matt/00-HELLO-WORLD.py @@ -5,7 +5,7 @@ from Tkinter import * class Test(Frame): def printit(self): - print "hi" + print("hi") def createWidgets(self): self.QUIT = Button(self, text='QUIT', foreground='red', diff --git a/Demo/tkinter/matt/animation-simple.py b/Demo/tkinter/matt/animation-simple.py index b52e1dc..071bde7 100644 --- a/Demo/tkinter/matt/animation-simple.py +++ b/Demo/tkinter/matt/animation-simple.py @@ -4,7 +4,7 @@ from Tkinter import * class Test(Frame): def printit(self): - print "hi" + print("hi") def createWidgets(self): self.QUIT = Button(self, text='QUIT', foreground='red', diff --git a/Demo/tkinter/matt/animation-w-velocity-ctrl.py b/Demo/tkinter/matt/animation-w-velocity-ctrl.py index e676338..68eb1d0 100644 --- a/Demo/tkinter/matt/animation-w-velocity-ctrl.py +++ b/Demo/tkinter/matt/animation-w-velocity-ctrl.py @@ -8,7 +8,7 @@ from Tkinter import * class Test(Frame): def printit(self): - print "hi" + print("hi") def createWidgets(self): self.QUIT = Button(self, text='QUIT', foreground='red', diff --git a/Demo/tkinter/matt/bind-w-mult-calls-p-type.py b/Demo/tkinter/matt/bind-w-mult-calls-p-type.py index f3220da..f744d26 100644 --- a/Demo/tkinter/matt/bind-w-mult-calls-p-type.py +++ b/Demo/tkinter/matt/bind-w-mult-calls-p-type.py @@ -24,11 +24,11 @@ class App(Frame): self.entrythingy.bind('<Key-Return>', self.print_something_else, "+") def print_contents(self, event): - print "hi. contents of entry is now ---->", self.entrythingy.get() + print("hi. contents of entry is now ---->", self.entrythingy.get()) def print_something_else(self, event): - print "hi. Now doing something completely different" + print("hi. Now doing something completely different") root = App() diff --git a/Demo/tkinter/matt/canvas-demo-simple.py b/Demo/tkinter/matt/canvas-demo-simple.py index a01679a..b677ccd 100644 --- a/Demo/tkinter/matt/canvas-demo-simple.py +++ b/Demo/tkinter/matt/canvas-demo-simple.py @@ -4,7 +4,7 @@ from Tkinter import * class Test(Frame): def printit(self): - print "hi" + print("hi") def createWidgets(self): self.QUIT = Button(self, text='QUIT', foreground='red', diff --git a/Demo/tkinter/matt/canvas-gridding.py b/Demo/tkinter/matt/canvas-gridding.py index 3c52b91..84f4ea0 100644 --- a/Demo/tkinter/matt/canvas-gridding.py +++ b/Demo/tkinter/matt/canvas-gridding.py @@ -7,7 +7,7 @@ from Tkinter import * class Test(Frame): def printit(self): - print "hi" + print("hi") def createWidgets(self): self.QUIT = Button(self, text='QUIT', diff --git a/Demo/tkinter/matt/canvas-reading-tag-info.py b/Demo/tkinter/matt/canvas-reading-tag-info.py index f57ea18..75990c9 100644 --- a/Demo/tkinter/matt/canvas-reading-tag-info.py +++ b/Demo/tkinter/matt/canvas-reading-tag-info.py @@ -3,7 +3,7 @@ from Tkinter import * class Test(Frame): def printit(self): - print "hi" + print("hi") def createWidgets(self): self.QUIT = Button(self, text='QUIT', foreground='red', @@ -28,14 +28,14 @@ class Test(Frame): # is used for widgets. (remember, this is for ITEMS drawn # on a canvas widget, not widgets) option_value = self.drawing.itemconfig(pgon, "stipple") - print "pgon's current stipple value is -->", option_value[4], "<--" + print("pgon's current stipple value is -->", option_value[4], "<--") option_value = self.drawing.itemconfig(pgon, "fill") - print "pgon's current fill value is -->", option_value[4], "<--" - print " when he is usually colored -->", option_value[3], "<--" + print("pgon's current fill value is -->", option_value[4], "<--") + print(" when he is usually colored -->", option_value[3], "<--") ## here we print out all the tags associated with this object option_value = self.drawing.itemconfig(pgon, "tags") - print "pgon's tags are", option_value[4] + print("pgon's tags are", option_value[4]) self.drawing.pack(side=LEFT) diff --git a/Demo/tkinter/matt/canvas-w-widget-draw-el.py b/Demo/tkinter/matt/canvas-w-widget-draw-el.py index 5b26210..3cbf937 100644 --- a/Demo/tkinter/matt/canvas-w-widget-draw-el.py +++ b/Demo/tkinter/matt/canvas-w-widget-draw-el.py @@ -4,7 +4,7 @@ from Tkinter import * class Test(Frame): def printhi(self): - print "hi" + print("hi") def createWidgets(self): self.QUIT = Button(self, text='QUIT', foreground='red', diff --git a/Demo/tkinter/matt/canvas-with-scrollbars.py b/Demo/tkinter/matt/canvas-with-scrollbars.py index 81ef25a..b55215d 100644 --- a/Demo/tkinter/matt/canvas-with-scrollbars.py +++ b/Demo/tkinter/matt/canvas-with-scrollbars.py @@ -7,7 +7,7 @@ from Tkinter import * class Test(Frame): def printit(self): - print "hi" + print("hi") def createWidgets(self): self.question = Label(self, text="Can Find The BLUE Square??????") @@ -46,8 +46,8 @@ class Test(Frame): def scrollCanvasX(self, *args): - print "scrolling", args - print self.draw.scrollX.get() + print("scrolling", args) + print(self.draw.scrollX.get()) def __init__(self, master=None): diff --git a/Demo/tkinter/matt/dialog-box.py b/Demo/tkinter/matt/dialog-box.py index dea8f39..0c71c3a 100644 --- a/Demo/tkinter/matt/dialog-box.py +++ b/Demo/tkinter/matt/dialog-box.py @@ -6,7 +6,7 @@ from Dialog import Dialog class Test(Frame): def printit(self): - print "hi" + print("hi") def makeWindow(self): """Create a top-level dialog with some buttons. diff --git a/Demo/tkinter/matt/entry-simple.py b/Demo/tkinter/matt/entry-simple.py index 5146e6f..0bf4cab 100644 --- a/Demo/tkinter/matt/entry-simple.py +++ b/Demo/tkinter/matt/entry-simple.py @@ -17,7 +17,7 @@ class App(Frame): self.entrythingy.bind('<Key-Return>', self.print_contents) def print_contents(self, event): - print "hi. contents of entry is now ---->", self.entrythingy.get() + print("hi. contents of entry is now ---->", self.entrythingy.get()) root = App() root.master.title("Foo") diff --git a/Demo/tkinter/matt/entry-with-shared-variable.py b/Demo/tkinter/matt/entry-with-shared-variable.py index 2b76162..c7cd259 100644 --- a/Demo/tkinter/matt/entry-with-shared-variable.py +++ b/Demo/tkinter/matt/entry-with-shared-variable.py @@ -39,7 +39,7 @@ class App(Frame): self.contents.set(str) def print_contents(self, event): - print "hi. contents of entry is now ---->", self.contents.get() + print("hi. contents of entry is now ---->", self.contents.get()) root = App() root.master.title("Foo") diff --git a/Demo/tkinter/matt/killing-window-w-wm.py b/Demo/tkinter/matt/killing-window-w-wm.py index 6a0e2fe..23ac103 100644 --- a/Demo/tkinter/matt/killing-window-w-wm.py +++ b/Demo/tkinter/matt/killing-window-w-wm.py @@ -7,11 +7,11 @@ from Tkinter import * ### ******* this isn't really called -- read the comments def my_delete_callback(): - print "whoops -- tried to delete me!" + print("whoops -- tried to delete me!") class Test(Frame): def deathHandler(self, event): - print self, "is now getting nuked. performing some save here...." + print(self, "is now getting nuked. performing some save here....") def createWidgets(self): # a hello button diff --git a/Demo/tkinter/matt/menu-all-types-of-entries.py b/Demo/tkinter/matt/menu-all-types-of-entries.py index f4afe4a..e4e4bfd 100644 --- a/Demo/tkinter/matt/menu-all-types-of-entries.py +++ b/Demo/tkinter/matt/menu-all-types-of-entries.py @@ -35,13 +35,13 @@ from Tkinter import * # some miscellaneous callbacks def new_file(): - print "opening new file" + print("opening new file") def open_file(): - print "opening OLD file" + print("opening OLD file") def print_something(): - print "picked a menu item" + print("picked a menu item") @@ -50,7 +50,7 @@ anchovies = 0 def print_anchovies(): global anchovies anchovies = not anchovies - print "anchovies?", anchovies + print("anchovies?", anchovies) def makeCommandMenu(): # make menu button diff --git a/Demo/tkinter/matt/menu-simple.py b/Demo/tkinter/matt/menu-simple.py index 46b5364..2487561 100644 --- a/Demo/tkinter/matt/menu-simple.py +++ b/Demo/tkinter/matt/menu-simple.py @@ -34,11 +34,11 @@ from Tkinter import * def new_file(): - print "opening new file" + print("opening new file") def open_file(): - print "opening OLD file" + print("opening OLD file") def makeFileMenu(): diff --git a/Demo/tkinter/matt/packer-and-placer-together.py b/Demo/tkinter/matt/packer-and-placer-together.py index 184d56b..84d3ee0 100644 --- a/Demo/tkinter/matt/packer-and-placer-together.py +++ b/Demo/tkinter/matt/packer-and-placer-together.py @@ -8,7 +8,7 @@ def do_motion(event): app.button.place(x=event.x, y=event.y) def dothis(): - print 'calling me!' + print('calling me!') def createWidgets(top): # make a frame. Note that the widget is 200 x 200 diff --git a/Demo/tkinter/matt/packer-simple.py b/Demo/tkinter/matt/packer-simple.py index f55f1be..1a505dd 100644 --- a/Demo/tkinter/matt/packer-simple.py +++ b/Demo/tkinter/matt/packer-simple.py @@ -3,7 +3,7 @@ from Tkinter import * class Test(Frame): def printit(self): - print self.hi_there["command"] + print(self.hi_there["command"]) def createWidgets(self): # a hello button diff --git a/Demo/tkinter/matt/placer-simple.py b/Demo/tkinter/matt/placer-simple.py index 30d9e9e..992a8fc 100644 --- a/Demo/tkinter/matt/placer-simple.py +++ b/Demo/tkinter/matt/placer-simple.py @@ -6,7 +6,7 @@ def do_motion(event): app.button.place(x=event.x, y=event.y) def dothis(): - print 'calling me!' + print('calling me!') def createWidgets(top): # make a frame. Note that the widget is 200 x 200 diff --git a/Demo/tkinter/matt/printing-coords-of-items.py b/Demo/tkinter/matt/printing-coords-of-items.py index a37733d..c74c1c3 100644 --- a/Demo/tkinter/matt/printing-coords-of-items.py +++ b/Demo/tkinter/matt/printing-coords-of-items.py @@ -35,7 +35,7 @@ class Test(Frame): # the "current" tag is applied to the object the cursor is over. # this happens automatically. self.draw.itemconfig(CURRENT, fill="red") - print self.draw.coords(CURRENT) + print(self.draw.coords(CURRENT)) def mouseLeave(self, event): # the "current" tag is applied to the object the cursor is over. diff --git a/Demo/tkinter/matt/radiobutton-simple.py b/Demo/tkinter/matt/radiobutton-simple.py index e9d6afe..eeddb23 100644 --- a/Demo/tkinter/matt/radiobutton-simple.py +++ b/Demo/tkinter/matt/radiobutton-simple.py @@ -12,7 +12,7 @@ from Tkinter import * class Test(Frame): def printit(self): - print "hi" + print("hi") def createWidgets(self): diff --git a/Demo/tkinter/matt/rubber-band-box-demo-1.py b/Demo/tkinter/matt/rubber-band-box-demo-1.py index b00518e..66b8f8b 100644 --- a/Demo/tkinter/matt/rubber-band-box-demo-1.py +++ b/Demo/tkinter/matt/rubber-band-box-demo-1.py @@ -2,7 +2,7 @@ from Tkinter import * class Test(Frame): def printit(self): - print "hi" + print("hi") def createWidgets(self): self.QUIT = Button(self, text='QUIT', diff --git a/Demo/tkinter/matt/rubber-line-demo-1.py b/Demo/tkinter/matt/rubber-line-demo-1.py index 59b8bd9..b1c8e78 100644 --- a/Demo/tkinter/matt/rubber-line-demo-1.py +++ b/Demo/tkinter/matt/rubber-line-demo-1.py @@ -2,7 +2,7 @@ from Tkinter import * class Test(Frame): def printit(self): - print "hi" + print("hi") def createWidgets(self): self.QUIT = Button(self, text='QUIT', diff --git a/Demo/tkinter/matt/slider-demo-1.py b/Demo/tkinter/matt/slider-demo-1.py index db6114b..5662db9 100644 --- a/Demo/tkinter/matt/slider-demo-1.py +++ b/Demo/tkinter/matt/slider-demo-1.py @@ -5,7 +5,7 @@ from Tkinter import * class Test(Frame): def print_value(self, val): - print "slider now at", val + print("slider now at", val) def reset(self): self.slider.set(0) diff --git a/Demo/tkinter/matt/subclass-existing-widgets.py b/Demo/tkinter/matt/subclass-existing-widgets.py index 0e08f92..fc04859 100644 --- a/Demo/tkinter/matt/subclass-existing-widgets.py +++ b/Demo/tkinter/matt/subclass-existing-widgets.py @@ -5,7 +5,7 @@ from Tkinter import * class New_Button(Button): def callback(self): - print self.counter + print(self.counter) self.counter = self.counter + 1 def createWidgets(top): diff --git a/Demo/tkinter/matt/two-radio-groups.py b/Demo/tkinter/matt/two-radio-groups.py index 9fd8f4f..52513ba 100644 --- a/Demo/tkinter/matt/two-radio-groups.py +++ b/Demo/tkinter/matt/two-radio-groups.py @@ -75,9 +75,9 @@ def makeFlavors(var): def printStuff(): - print "party is", party.get() - print "flavor is", flavor.get() - print + print("party is", party.get()) + print("flavor is", flavor.get()) + print() ################################################# #### Main starts here ... diff --git a/Demo/tkinter/matt/window-creation-more.py b/Demo/tkinter/matt/window-creation-more.py index eb0eb6f..3a4ce19 100644 --- a/Demo/tkinter/matt/window-creation-more.py +++ b/Demo/tkinter/matt/window-creation-more.py @@ -5,7 +5,7 @@ from Tkinter import * class Test(Frame): def printit(self): - print "hi" + print("hi") def makeWindow(self): fred = Toplevel() diff --git a/Demo/tkinter/matt/window-creation-simple.py b/Demo/tkinter/matt/window-creation-simple.py index c990ed9..fdf1dcc 100644 --- a/Demo/tkinter/matt/window-creation-simple.py +++ b/Demo/tkinter/matt/window-creation-simple.py @@ -4,7 +4,7 @@ from Tkinter import * class Test(Frame): def printit(self): - print "hi" + print("hi") def makeWindow(self): fred = Toplevel() diff --git a/Demo/tkinter/matt/window-creation-w-location.py b/Demo/tkinter/matt/window-creation-w-location.py index 9f23bac..af6f876 100644 --- a/Demo/tkinter/matt/window-creation-w-location.py +++ b/Demo/tkinter/matt/window-creation-w-location.py @@ -9,9 +9,9 @@ import sys class QuitButton(Button): def __init__(self, master, *args, **kwargs): - if not kwargs.has_key("text"): + if "text" not in kwargs: kwargs["text"] = "QUIT" - if not kwargs.has_key("command"): + if "command" not in kwargs: kwargs["command"] = master.quit Button.__init__(self, master, *args, **kwargs) |