changeset 1 | 2fb8b9db1c86 |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/symbian-qemu-0.9.1-12/python-2.6.1/Demo/tkinter/guido/hello.py Fri Jul 31 15:01:17 2009 +0100 @@ -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()