What GUI toolkit looks the best?

Edward K. Ream edreamleo at charter.net
Thu Dec 11 11:26:06 EST 2003


I have a lot of experience with both wxPython and Tkinter.  I would urge
caution regarding any quick judgments.  All cross-platform toolkits have
significant bugs and design flaws.

My experience is that Tkinter is the "least bad" and more flexible.
wxPython (of course) inherits all the _many_ bugs in wxWindows.  It's not
clear that wxWindows really actually works. Whenever I use
wxPython/wxWindows I find more bugs in a week than I have found in 3+ years
with Tk/Tkinter. YMMV.  The (admittedly very cool) wxPython demo regularly
segfaults on Windows.  Sheesh.

The main point is that some real experimentation (and risk!) is going to be
required for any significant project.  You may as well budget some time for
frustration: it _is_ going to be there.

Just one example of what you might expect.  My app uses a Text widget in
many non-trivial ways.  Both Tkinter/Tk and wxPython/wxWindows have
seemingly minor, but actually _major_ problems with Text widgets.

Tk "helpfully" adds a newline at the end of text widgets in various
situations, which leads to no end of complications in my app.  I wish Tk
would just _buzz off_ and not mess with my data.  But noooooo.

The wxWindows Text widget, OTOH, uses an absolutely brain-dead api that
exposes platform-specific line endings.  The complications become truly
horrendous for serious work: there is no proper model behind Text offsets.

Actually, both Tkinter and wxPython totally suck regarding offsets into text
widgets.  One would like integer offset in the text widget to be _identical
in all respects_ with the integer offset into the Python strings that one
passes to and receives from these widgets.  But nooooooo... I call this the
"cursed offset problem", which is really a special case of the "cursed
newline problem" :-)

In short, any cross-platform gui is going to cause you unexpected problems.
I'm not saying "don't use these tools".  I am saying: "be prepared for nasty
surprises".

Edward

P.S.  The idea that Tk is going to be "revitalized" any time soon is a
yawner, IMO.  Wake me up when it happens.

EKR
--------------------------------------------------------------------
Edward K. Ream   email:  edreamleo at charter.net
Leo: Literate Editor with Outlines
Leo: http://webpages.charter.net/edreamleo/front.html
--------------------------------------------------------------------






More information about the Python-list mailing list