Run 2to3 over the Demo/ directory to shut up parse errors from 2to3 about lingering print statements.

This commit is contained in:
Collin Winter 2007-07-17 20:59:35 +00:00
parent a8c360ee76
commit 6f2df4d5e1
132 changed files with 1070 additions and 1080 deletions

View file

@ -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',

View file

@ -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',

View file

@ -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',

View file

@ -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()

View file

@ -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',

View file

@ -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',

View file

@ -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)

View file

@ -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',

View file

@ -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):

View file

@ -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.

View file

@ -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")

View file

@ -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")

View file

@ -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

View file

@ -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

View file

@ -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():

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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.

View file

@ -12,7 +12,7 @@ from Tkinter import *
class Test(Frame):
def printit(self):
print "hi"
print("hi")
def createWidgets(self):

View file

@ -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',

View file

@ -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',

View file

@ -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)

View file

@ -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):

View file

@ -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 ...

View file

@ -5,7 +5,7 @@ from Tkinter import *
class Test(Frame):
def printit(self):
print "hi"
print("hi")
def makeWindow(self):
fred = Toplevel()

View file

@ -4,7 +4,7 @@ from Tkinter import *
class Test(Frame):
def printit(self):
print "hi"
print("hi")
def makeWindow(self):
fred = Toplevel()

View file

@ -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)