From 5b98ac5b14b7f01d24aecd3d371ed899ed3f671c Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 10 Apr 1995 11:46:37 +0000 Subject: added hello world --- Demo/tkinter/guido/hello.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 Demo/tkinter/guido/hello.py (limited to 'Demo/tkinter/guido/hello.py') diff --git a/Demo/tkinter/guido/hello.py b/Demo/tkinter/guido/hello.py new file mode 100755 index 0000000000..237204fab8 --- /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() -- cgit v1.2.1