GUIs: wxPython vs. Tkinter (and others)

Mike Meyer mwm at
Sat Dec 11 01:55:52 EST 2004

"Erik Johnson" <spam at> writes:

>     I am looking for some input on GUI libraries.

Since you said others, I'll recommend PyQt. Major downside with it is
that it costs money on Windows.

>     o What features does wxPython offer that Tkinter cannot (and vice
> versa)?

I don't know about wxPython, but PyQt includes it's own threading
facility, plus hooks to talk to databases. It also has a widget for
creating Windows "wizards" for walking through a set of options.

>     o Is the general programming methodology pretty much the same between
> the two (e.g., the general program structure - using callbacks & Frames,
> etc. is the same, it's just a question of calling different widgets with
> their own arguments)?

Not for Qt. It has the notion of SLOTs and SIGNALs. You connect a
signal from an object to a slot or signal on another (or the same)
object. You can, for example, connect a signal from a slider widget to
a slot on a digital display widget, thus causing the display to change
as you move the slider.

At the python level, slots are just callable objects. At the
C++ level, slots are magic methods of objects. Signals are usually
associated with GUI events, but Python can emit them for whatever
reason it wants. It's possible to connect C++ signals to C++
slots/signals in Python, meaning that Python won't be involved when
that signal is emitted.

>     o Do you have a strong preference for one over the other (or some other
> toolkit)? Why?

I strongly prefer PyQt TkInter. PyQt provides a higher level of

>     o Is animation and graphics particularly better suited to one over the
> other?

I've never tried doing animation in TkInter. Qt provides timer devices
that you can use to drive animations. I suspect that doing the same in
TkInter would be noticably more difficult.

Mike Meyer <mwm at>
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

More information about the Python-list mailing list