diff options
author | Guido van Rossum <guido@python.org> | 1995-04-10 11:46:37 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1995-04-10 11:46:37 (GMT) |
commit | 5b98ac5b14b7f01d24aecd3d371ed899ed3f671c (patch) | |
tree | 07843bf1112c3232216766b30702ddb8864f2c52 /Demo | |
parent | 4e620374b8912342c0baf7391099c703cf55c0a7 (diff) | |
download | cpython-5b98ac5b14b7f01d24aecd3d371ed899ed3f671c.zip cpython-5b98ac5b14b7f01d24aecd3d371ed899ed3f671c.tar.gz cpython-5b98ac5b14b7f01d24aecd3d371ed899ed3f671c.tar.bz2 |
added hello world
Diffstat (limited to 'Demo')
-rwxr-xr-x | Demo/tkinter/guido/hello.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Demo/tkinter/guido/hello.py b/Demo/tkinter/guido/hello.py new file mode 100755 index 0000000..237204f --- /dev/null +++ b/Demo/tkinter/guido/hello.py @@ -0,0 +1,17 @@ +# Display hello, world in a button; clicking it quits the program + +import sys +from Tkinter import * + +def main(): + root = Tk() + button = Button(root) + button['text'] = 'Hello, world' + button['command'] = quit_callback # See below + button.pack() + root.mainloop() + +def quit_callback(): + sys.exit(0) + +main() |