[Python-Dev] What to choose to replace Tkinter?
Guido van Rossum
Mon, 23 Oct 2000 16:08:13 -0500
> This raises anew a question I've been meaning to bring up for the last
> week: is it finally time to move away from Python's dependence on
> Tcl/Tk for GUI support?
> It seems to me that the Tcl world has been in increasing disarray for
> the last two years. Its growth doesn't seem to have matched Perl's or
> Python's; no strong community site analogous to python.org or CPAN has
> emerged; and John Osterhout's attempt to commercialize the language
> have led to a series of false starts and erratic moves. And Osterhout
> cheerfully acknowledges that on a technical level that Tcl has been
> pushed past the natural limits of applicability for its design
> Tcl's long-term prognosis looks, to me, increasingly poor. Which
> suggests to me that some move toqwards making Python less dependent
> on Tk would be a good thing.
> I understand that we can't simply drop Tkinter. But I think it
> might be worth another look at alternatives (notably wxPython) to
> consider bringing one into the core distribution during 2.x, so that
> later on we can plan to move Tk to "unsupported -- legacy".
Yes, it may be time to have this discussion again.
Of course, Tcl/Tk still has a much larger following than wxWindows,
and it is more stable too. (For example, it's easy to cause crashes
-- not just exceptions -- by leaving out an initialization call in
Plus, Tk has two very high quality widgets: the Canvas and Text
widgets are unsurpassed in functionality and robustness by other
widget sets. You can draw more lines or characters per second in most
toolkits, but few toolkits offer the convenience of marks and tags,
not having to deal with refresh events, being able to group objects,
move them around, change attributes, etc., etc., etc.
The Scintilla text widget comes close (and surpasses Tkinter in some
respects, while coming short in others), but I know of no widget in a
popular widget set that offers anything close to the Canvas widget.
There are other choices too, all of which have Python support already:
gtk, qt, and the Mozilla toolkit (whose name I forget -- maybe David
Ascher can fill me in).
--Guido van Rossum (home page: http://www.python.org/~guido/)