Python GUIs: Abandoning TkInter and welcoming wxPython?
fredrik at pythonware.com
Tue Jun 29 11:37:09 CEST 1999
Michael P. Reilly <arcege at shore.net> wrote:
> But.. the argument over (these two) GUIs is not exactly a valid one.
> Tkinter was written using the Tcl interface not the Tk/C API. If
> Tkinter was rewritten to use the C API, it probably wouldn't be slower
> than wxPython.
The interface is only part of the story; many complaints
seem to come from the fact that Tk uses idle tasks to
redraw things. When an "expose" event arrives from
the windowing system, Tk calls "after_idle", rather
than redrawing the widget at once. And idle tasks
are only executed when there are no other events
to take care of...
Tk also uses double buffering for all widgets, which is
quite expensive, especially since Tk allocates a new
buffer for each update :-(
In fact, since wxPython has to go thru extra layers, it
> would probably be slower (Tk/C is written on the native API on all the
What native API? As of 8.0, Tk still emulates all widgets
except the scrollbar, and use a somewhat ineffective
X emulation layer for graphics. AFAIK, they haven't
changed that in 8.1...
(We've fixed all this in uiToolkit, of course, but that's
another story ;-)
More information about the Python-list