Python GUIs: Abandoning TkInter and welcoming wxPython?

Mikael Lyngvig mikael at pobox.com
Wed Jun 30 19:51:19 EDT 1999


On 26 Jun 1999 21:37:12 GMT, zeitlin at seth.lpthe.jussieu.fr (Vadim
Zeitlin) wrote:

> While I don't think wxPython can replace TkInter as a de-facto GUI standard
>for Python I still think that it has several advantages compared to TkInter.
>Instead of saying how much better, prettier, faster (this one has really made
>me smile, BTW: I don't think wxWin is currently very fast, if it has been
>cited as its advantage it must really mean that TkInter is extremely slow. 

Well, TkInter is extremely slow, but not because of the Python part.
Even the Tk widget tour, included with Tk, is so slow that you almost
think "Please, draw the next character - you can do it." whenever a
window with some text needs to be redrawn.

In contrast, the wxPython demo is so fast that you probably wouldn't
realize it is implemented in Python, unless you're used to do GUI
programming yourself.

One important point is that I probably experience Tk(Inter) as slow
because I'm used to Win32 desktops with very fast graphics hardware
and no X/Windows style client/server architecture.  I imagine that
many X/Windows users experience Tk(Inter) as fast enough.

>we're working on performance problems too...) - instead, I'd just like to say
>that unlike probably any other GUI toolkit, wxWindows developers are
>interested in making their toolkit useful to the Python community. I don't
>speak only about Robin Dunn, of course, who developed wxPython, but about
>"core" wxWindows developers as well.

The wxWindows performance problems must be more of the "this could be
done better" than "this has to be done better" nature.  

> TkInter has, for the moment, several advantages compared to wxWindows (it
>would be nice if someone did the comparison of 2 toolkits - I'm afraid I don't
>know TkInter well enough to do it), but we're working hard to change this and
>I sincerely believe that wxWin will have all the features we still miss and
>which are present in TkInter really soon (an advanced text widget and
>integrated HTML viewer are in alpha and beta stage; image support in wxWin
>already includes GIF/JPEG/PNG/BMP/XPM; multimedia classes are waiting to
>be integrated in the main distribution; the grid control is being actively
>worked on by several people right now).

A very strong plus for wxWindows is that the Python API and the native
C++ API are so close that it actually makes sense to use Python in the
design and prototyping phase and then rewrite the Python code to C++,
if you want to, when you've reached a stable design.

Personally I feel that it makes most sense to retain TkInter as the
de-facto GUI for Python - at least for a while yet.  But, I don't
think I will ever use TkInter for anything.  (this is probably an
argument for not having a de-facto standard GUI for Python)

As my reply to Michael P. Reilly shows, I don't believe that TkInter
can be boosted significantly unless a *lot* of energy is put into the
task.  I think it would be better to spend this energy on extending
and enhancing wxWindows till it is ready to take over.

P.S. No offense intended to TkInter users.  This is just the way I see
things.


-- Mikael




More information about the Python-list mailing list