Tkinter vs. wxPython?

Mark 'Kamikaze' Hughes kamikaze at kuoi.asui.uidaho.edu
Wed May 5 16:08:10 EDT 2004


SeeBelow at SeeBelow.Nut <SeeBelow at SeeBelow.Nut>
wrote on Tue, 27 Apr 2004 23:07:16 GMT:
> I'm mostly a C programmer, with a little Python experience.  I have only
> basic needs for GUI and graphics.  The Tkinter set of widgets seems
> adequate for my needs, although one never knows for sure what ones needs
> might be.
> Portability is important.  My audience is 50/50 linux and Windows
> people.  I myself use Win 2000.
> Ease of learning is important to me.  I have only a little experience
> with GUI and graphics programming.  I keep using the phrase "GUI and
> graphics" because I need graphical output from my programs, not just a
> GUI to control them.

  For ease of learning and portability, and if you don't need 60fps
videogame speed, Tkinter blows anything else for Python away.  Pick up
John Grayson's _Python and Tkinter Programming_
<http://www.manning.com/grayson/>, and don't look back.

  I wrote Umbra, a pseudo-3D computer RPG, in Python with Tkinter.
While it has problems, it works.  Two years ago, I attempted to rewrite
it in PyQT, which was a total failure.  Last year, I attempted to
rewrite it in PyGame, which works and is faster, but requires an immense
amount of extra code to accomplish the same tasks.

  However, Tkinter works well enough that it's not a big issue for
applications other than games.  Drawing on a Tkinter canvas is not as
slow as you'd expect, though it's fairly limited.  The image support is
terrible (especially since the cropping function from Tk has never been
implemented in Tkinter, and the maintainers don't seem to give a damn),
but PIL sort of fills the gap, if you don't mind learning yet another
API and converting back and forth (which is slow).

  I've written a few toy apps in wxWindows^WwxWidgets, and it's really a
pain in the butt, on par with PyQT for doing things its own way instead
of the Python way, and of course there's bugger-all in the way of
documentation.

  Distribution of any of the alternative GUI toolkits with Python apps
is a pain.  It can be done, but it's extra work in packaging, and more
potential problems for end-users, that you don't have with Tkinter.

  The GUI experience on Python is inadequate.  I love Python for
server-side tasks, but I will never write another serious GUI app in it
until/unless it gets a better standard GUI, preferably something built
on top of PyGame.

-- 
 <a href="http://kuoi.asui.uidaho.edu/~kamikaze/"> Mark Hughes </a>
"Doing the impossible makes us mighty." -Captain Malcolm Reynolds, Firefly



More information about the Python-list mailing list