Kaydet (Commit) 639b8b8d authored tarafından Guido van Rossum's avatar Guido van Rossum

Misc changes by Steen

üst e20864d6
...@@ -6,13 +6,12 @@ def do_hello(): ...@@ -6,13 +6,12 @@ def do_hello():
print 'Hello world!' print 'Hello world!'
class Quit(Button): class Quit(Button):
def action(self):
self.quit()
def __init__(self, master=None, cnf={}): def __init__(self, master=None, cnf={}):
Button.__init__(self, master, Button.__init__(self, master,
{'text': 'Quit', ({'name': 'quit',
'command': self.action}) 'text': 'Quit',
Button.config(self, cnf) 'command': self.quit},
cnf))
class Stuff(Canvas): class Stuff(Canvas):
def enter(self, e): def enter(self, e):
...@@ -77,5 +76,5 @@ test.master.maxsize(500, 500) ...@@ -77,5 +76,5 @@ test.master.maxsize(500, 500)
test.testing.invoke() test.testing.invoke()
# Use the -i option and type ^C to get a prompt # Use the -i option and type ^C to get a prompt
test.mainloop() mainloop()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment