symbian-qemu-0.9.1-12/python-2.6.1/Demo/tkinter/guido/hello.py
author Shabe Razvi <shaber@symbian.org>
Wed, 21 Oct 2009 13:56:56 +0100
changeset 17 c506b18dc03f
parent 1 2fb8b9db1c86
permissions -rw-r--r--
Added tag PDK_3.0.b for changeset 5c4b0c1fa5f8

# 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()