]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Misc changes by Steen
authorGuido van Rossum <guido@python.org>
Wed, 6 Jul 1994 09:27:00 +0000 (09:27 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 6 Jul 1994 09:27:00 +0000 (09:27 +0000)
Demo/tkinter/guido/tst.py

index 818d90bf659e08890ac72ddfa69368d98ca8757a..e30fc8429090ac4afb6d9d3c45ec32e7b93404cf 100755 (executable)
@@ -6,13 +6,12 @@ def do_hello():
        print 'Hello world!'
 
 class Quit(Button):
-       def action(self):
-               self.quit()
        def __init__(self, master=None, cnf={}):
                Button.__init__(self, master, 
-                               {'text': 'Quit', 
-                                'command': self.action})
-               Button.config(self, cnf)
+                               ({'name': 'quit',
+                                 'text': 'Quit', 
+                                 'command': self.quit},
+                                cnf))
 
 class Stuff(Canvas):
        def enter(self, e):
@@ -77,5 +76,5 @@ test.master.maxsize(500, 500)
 test.testing.invoke()
 
 # Use the -i option and type ^C to get a prompt
-test.mainloop()
+mainloop()