[Tutor] Graphics with Python: wxPython vs. tkinter vs. PyCairo vs. PyX vs...

John Fouhy john at fouhy.net
Thu Jan 18 00:57:34 CET 2007

On 18/01/07, Vijay Pattisapu <lexicontrol at gmail.com> wrote:
> Hey friends--
> I've been looking through the archives and haven't found any
> comparative evaluation of Python graphics libraries...
> Which is the best (or your favorite), and for what tasks?

I only have experience with Tkinter and wxPython.

Tkinter is easy, and feels much more pythonic than wxPython.  However,
Tkinter doesn't have a wide range of widgets available (although Pmw
does a good job of faking some more).  Also, Tkinter doesn't use
native widgets, so it will be slower and Tkinter apps will look
foreign and ugly on most systems.

wxPython uses native widgets, so it looks nice.  The biggest problem
with wxPython is that it has evolved from a bare wrapper around C++ to
something more pythonic, but it hasn't left much behind.  There are
several programming styles (explicit IDs? implicit IDs? no IDs?
Keyword arguments or positional arguments?) and several ways of
positioning widgets (sizers, which are like pack/grid, or explicit
positioning, or one or two other methods).

The upshot is that you can write nice pythonic code, but a lot of the
examples you will find will be in a different style, and many of the
experienced coders are used to an older style of wx coding.

But wxPython is better than Tkinter for apps you're going to spend
time on, or show to other people.


More information about the Tutor mailing list