GUIs - A Modest Proposal

Steven D'Aprano steve-REMOVE-THIS at cybersource.com.au
Wed Jun 9 19:11:56 EDT 2010


On Wed, 09 Jun 2010 04:16:23 -0700, ant wrote:


> 1 Although a few advocates of Tkinter have spoken in favour of it, most
> seem to think that:
>     It's not particularly elegant, either in its use or its
> implementation with Tcl/Tk
>     If we didn't have a GUI in the distribution, we wouldn't choose
> Tkinter now; it seems like its inclusion
>     is  a sort of historical accident.

I'm not so sure about that. If we didn't have a GUI, what would we 
include? There are many alternatives, of course, but nothing that stands 
out as "the" obvious choice for the standard library. It seems to me that 
the odds are good that Tkinter *would* be choosen today. Particularly 
since modern versions of Tk use native widgets and so look better.

It's easy to dump on Tkinter, and I've done so myself, but it's not that 
bad all things considering.


[...]
> whenever I
>   write a program that someone else is going to use, it has to have a
> GUI. Is that not true for most people?

No. Most Python development is for either the web or the command line.



> 5 I should stop pontificating, and write code. If it's better than the
> existing, people will use it and it will
>   become the standard.
>   I don't think so. Even vast libraries of well-written code haven't
> become the standard.

Not everything needs to be "the standard". I believe GUIs are like that. 
The requirements and complexity of GUI toolkits are difficult enough that 
having choice between three or four "world-class" toolkits (which slowly 
converge on equivalent functionality, if not equivalent APIs) is a good 
thing.


 
> So I think comments like "the system doesn't work like that - nothing
> happens till code is working" miss the point. We are not talking about
> some vital but complex module or library here - it's more important than
> that.

No, it *is* the point. This is Open Source. Code walks the walk, and 
everything else is just chat. *If* you inspire somebody to take up the 
challenge, then great, but otherwise this is just wasted electrons.

If writing the code is too much for you, write a PEP explaining why you 
think Tkinter must go and what features you expect in the replacement. Or 
do a comprehensive survey of what GUIs are available, and what it would 
take to make them part of the standard library.

Even a comprehensive comparison of cost/benefits for GUI toolkits would 
be a start. You might find that, when looking at what *actually* exists, 
and how high the bar is even for an entry-level toolkit, Tkinter starts 
looking better and better. Or not. Who knows? Until somebody does the 
work, it's all just opinion, and unjustified opinion at that.


> We are talking about the thing that the rest of the world sees as
> Python's biggest missing piece - the thing that beginning programmers
> look for and don't find - a decent, well- supported and elegant GUI.

I disagree. It's not 1995 any more. As much as it pains me to acknowledge 
it, the world has moved on and the cutting edge is in the browser, not 
the desktop. That's not to say that desktop apps aren't important, they 
are, but the web is where all the action is.



-- 
Steven



More information about the Python-list mailing list