From 458120dd40db6b4df55a4e96b650e16798ef06a0 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Tue, 3 May 2011 11:25:13 +0000 Subject: add hg and python --- sys/src/cmd/python/Demo/tkinter/guido/hello.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 sys/src/cmd/python/Demo/tkinter/guido/hello.py (limited to 'sys/src/cmd/python/Demo/tkinter/guido/hello.py') diff --git a/sys/src/cmd/python/Demo/tkinter/guido/hello.py b/sys/src/cmd/python/Demo/tkinter/guido/hello.py new file mode 100755 index 000000000..358a7eceb --- /dev/null +++ b/sys/src/cmd/python/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() -- cgit v1.2.3