[Tutor] tkinter v. wxpython

Richard P. Muller rpm@wag.caltech.edu
Tue, 29 May 2001 05:33:56 -0700


Scott wrote:
> 
> Could someone compare and contrast?  Thank you.
> 

Here goes:

Tkinter uses the Tk toolkit for GUI construction. wxpython uses GTK on
Linux platforms, and the standard windows toolkit on Windows. As such,
both are cross platform development tools. Tkinter also runs on
Macintosh; last time I checked wxpython was being ported there, but I'm
not sure whether the port has been completed.

The advantage of Tkinter is that it's included with Python. Thus, any
code you write that uses Tkinter will probably run on everyone's python
installation. The Python Mega-Widgets (PMW) are built using Tkinter, and
give the interface some much-needed additional widgets. But overall the
widgets are fairly outdated.

wxpython has some more modern widgets, but I've found the interface a
little non-intuitive. Plus, we've had trouble getting the OpenGL to work
with wxpython in cross-platform applications, but that might just be our
bad luck. 

The other alternative is to simply use the GTK widgets themselves. The
GTK widgets are very up-to-date. You can even use Glade (a graphical
design tool) to design your GUI. We haven't tried using PyGTK on
windows, but it should be possible, as the GTK widgets are ported there.

I used Tkinter to write the Python Checkbook Manager, since I wanted to
allow it to run on as many machines as possible. But for code that only
needs to run on Linux, we are now using PyGTK almost exclusively.

Rick