Tkinter vs wxPython: your opinions?

Neil Cerutti cerutti at together.net
Fri Jan 26 08:20:07 EST 2001


Vadim Zeitlin posted:
>On 25 Jan 2001 19:41:19 GMT, Neil Cerutti <cerutti at together.net> wrote:
>>The current documentation for Tkinter is much better than what
>>is available for wxPython. 
>
>This is very strange. Where is good documentation for Tkinter to
>be found? When I had tried to learn using it (this was 5 years
>ago, true) I couldn't find any documentation at all. wxWindows
>documentation is probably what has personally attracted me so
>much to it.

You have misunderstood me. I didn't intend to, and had no basis
for, comparing  tcl/tk and wxWindows. My comments, especially
regarding the documentation, apply only to Tkinter and wxPython,
the Python incarnations of these tool kits. Take a look at the
number of design patterns included in Fredrik Lundh's "Tutorial"
for a taste of what it can mean to a Python programmer like me,
with no experience writing a GUI, and little experience writing
C++ programs.

I'm willing to believe the documentation for wxWindows is
excellent, provided you're familiar with reading specificatinos
for C++ libraries. But the documentation for wxPython doesn't
compare to what you get for Tkinter, in my opinion. C++
specification with occassional Python notes is *hard* for me to
use.

The demo program included with wxPython is actually a great help,
and the best place to find help. But the stuff it doesn't cover
is hard for me to do, e.g, popup menus.

>>Tkinter's 'pack' layout manager is super easy to use, and with
>>some practice and the excellent documentation, powerful.
>>wxPython seems to have a couple of layout managers, but how
>>they should be used is a mystery.
>
>Well, this *is* explained in the docs. Besides, the sizers are
>mostly what you'd expect them to be (if you have experience with
>other GUI frameworks using such things). I don't even think they
>are that far from Tkinter layout manager although I don't know
>it well enough to be sure.

You're right and I was unfair to say it was a mystery. But the
chapter from the book on Tkinter programming I linked to was much
better, for me, than the documenation provided.

>>I've been forced to place everything pixel by pixel so far.
>
>No offense intended, but this is the worst possible way to do
>it.

I'll make a point to add a layout manager to my program today.

>It is possible to handle events from several widgets or
>different events from the same widget in the same event handler
>in wxPython, so I'm not sure how much different can it be.

It may not be much different, but so far it hasn't been as
intuitive. Perhaps because Tkinter is itself based on another
scripting language, certain concepts percolate better into Python.

>>The objects in wxPython are more full-featured (I guess--for
>>some definition of full featured), but aren't as easily
>>configurable as the Tkinter ones.
>
>There is a trade off between having your own, completely
>customizable (because you can tweak them in any way you like)
>widgets and using the standard ones. wxWindows chooses the 2nd
>i.e. it favours the native look and feel.

Thanks. I'm glad I wasn't imagining it. However, Tkinter's latest
incarnation has a great native look, if not feel. Though I found
I could simulate whatever feel I wanted with a little work.

>>wxPython's documentation seems to be in the state Tkinter's was
>>back when all there was was the _Tkinter life preserver_.
>
>I still wonder what documentation are you speaking of?

I included links to the best Tkinter documentation I'm aware of.
The wxPython documentation doesn't compare to it, yet.

>Also, I'd advise you to ask the various technical questions you
>had (handling ESC, popup menus, ...) on wxPython mailing list.
>I'm not sure they will be answered, but it's certainly worth a
>try.

Thanks.

>>Better advice is probably to try them both for some small
>>sample app, like I have, and make up your own mind. Perhaps
>>wxPython makes perfect sense if you are a good C++ programmer.
>
>On my own example it certainly does :-)

Yup.

-- 
Neil Cerutti <cerutti at together.net>
"If you're gonna score 125 points in a game, you've only got to
play good enough defense to hold the other team to 124. How
the hell hard is that?" -- Red Auerbach



More information about the Python-list mailing list