FW: [Tutor] GUI's

alan.gauld@bt.com alan.gauld@bt.com
Tue, 12 Oct 1999 17:54:55 +0100


spiderman@nasachem.com wrote
> I was wondering how you could make a GUI python program for 
Windows 95
 
Tkinter comes with Python.
SpecPython is an addon to SpecTCL, a GUI builder for Tk/Java
 
JPython implements the JAVA AWT (and Swing?) in Python

Either approach will create a GUI running in Python.

There are a couple of Tkinter tutorials on the Web.
I personally prefer this one:

http://www.pythonware.com/library/tkinter/introduction/index.htm

Here's Python/Tkinter's minimal Hello world:
#-----------------------
# pull in all the widget names
from Tkinter import *

# create a label widget and add it to the root window
w = Label(0, text="Hello, world!") # 0 => no parent window
w.pack()

# start processing user events
w.mainloop()
#-----------------------

Alan G.