What GUI toolkit looks the best?

Brian Kelley bkelley at wi.mit.edu
Thu Dec 11 13:31:19 EST 2003


Edward K. Ream wrote:
> 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.

That's very interesting.  I've never had the wxPython demos segfault on 
windows, and I use it regularly (2 years) to examine various widgets.  I 
wonder if your setup or mine is the "special case" :)

> 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.

Absolutely.  The main attraction for me was wxWindows grid widget.  I 
use it to browser databases with 1,000,000+ entries.

> 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.

I hate wxPython's text widget for most of the reasons you described. 
Plus, since we are using python, why isn't there a .write(...) method 
for these widgets?  Why can't I use a text widget like:

sys.stdout = TextCtrl(parent)

I had to make a wrapper around the text widget to make it behave like a 
StringIO() class.  It internally did all the necessary conversions to 
the strings, but now I can use

widget.write()
widget.read()
widget.readlines()
widget.seek()

for line in widget:
     pass

And the bastardication
print >> widget, file.read()

as if it were a real file object.

The interface to formatted text was a pain though.  I still don't have a 
good way of greating formatting except to say that it is in parallel 
with the text stream.

Brian






More information about the Python-list mailing list