source: python/trunk/Demo/tkinter/guido/hello.py

Last change on this file was 2, checked in by Yuri Dario, 15 years ago

Initial import for vendor code.

  • Property svn:eol-style set to native
File size: 331 bytes
Line 
1# Display hello, world in a button; clicking it quits the program
2
3import sys
4from Tkinter import *
5
6def 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()
13
14def quit_callback():
15 sys.exit(0)
16
17main()
Note: See TracBrowser for help on using the repository browser.