From: Guido van Rossum Date: Mon, 10 Apr 1995 11:46:37 +0000 (+0000) Subject: added hello world X-Git-Tag: v1.2~7 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5b98ac5b14b7f01d24aecd3d371ed899ed3f671c;p=thirdparty%2FPython%2Fcpython.git added hello world --- diff --git a/Demo/tkinter/guido/hello.py b/Demo/tkinter/guido/hello.py new file mode 100755 index 000000000000..237204fab829 --- /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()