Improved some error messages for command line processing.
[python/dscho.git] / Demo / tkinter / guido / hello.py
blob237204fab8297a89bc080c030317ca7fe9a87d47
1 # Display hello, world in a button; clicking it quits the program
3 import sys
4 from Tkinter import *
6 def main():
7 root = Tk()
8 button = Button(root)
9 button['text'] = 'Hello, world'
10 button['command'] = quit_callback # See below
11 button.pack()
12 root.mainloop()
14 def quit_callback():
15 sys.exit(0)
17 main()