UI toolkits for Python

Kenneth McDonald kenneth.m.mcdonald at sbcglobal.net
Thu Oct 13 16:49:59 EDT 2005


Thanks for reminding me of Gtk. OK, add that to the list.

The Web Browser interface is good for simple things, and will get better
with CSS2's adoption, but they still don't have a good way for important
things like interactive styled text, key bindings, etc. Good for  
simple things
(for which I use them), not for more complex stuff.

As for Tkinter, well, sigh, I have to go into a semi-rant, semi- 
eulogy right now.

Tk was, IMHO, the hands-down award winner for UI toolkit farthest  
ahead of
its time. I used it for years and years and years.

Tcl, on the other had, wasn't the _worst_ scripting language of all  
time, but it
was sure down in the bottom ten percent. How John Ousterhout could  
come up
with Tk on one hand and the other at the same Tcl boggles my mind.

Unfortunately, while Tkinter did provide in theory full access to Tk,  
it was in
practice never finished. I wrote quite a bit of code to try to add a  
true pythonic
interface to Tk via Tkinter (I'm happy to give it away if anyone  
wants--some of
it is actually in pretty good shape). But it's a big job, and it  
became clear to me
that Tk is going the way of the dinosaurs, so I abandoned it.

Ddevelopment on the advanced features of Tk--what really made it worth
using--has languished. Both marks and tags in the Text widget have been
fundamentally broken forever (not buggy, I mean broken in the sense that
their semantics destroys a great deal of their real potential), and I  
don't see
they'll ever be fixed. Same thing with tags in the Canvas widget.  
Plus the
lack of well-thought-out new widgets, and various other sins of omission
and comission, and I decided that Tkinter was clearly in the last of  
its days.

That said, if I was one of the founders of Google, Tk would be one of  
the
projects I'd hire a lot of people to get on to and actually realize  
its potential.
But I don't even buy lottery tickets :-)

Now I'm just waiting until one of the other kits becomes mature enough
(if ever) to start using it. So this is a query about that :-)
On 13-Oct-05, at 3:21 PM, Paul Rubin wrote:

> Kenneth McDonald <kenneth.m.mcdonald at sbcglobal.net> writes:
>
>> 1) Which plays best with Python? Ideally, it would already have some
>> higher-level python libraries to hide the grotty stuff that is almost
>> never needed when actually implementing apps.
>>
>> 2) Reliability of each?
>>
>> 3) Useful external libraries for each?
>>
>> 4) Ease of installation/use on OS X?
>>
>
> The answer to each of those questions points to Tkinter.  It comes
> with Python by default (the least installation hassles of any
> toolkit), is pretty reliable, has a reasonably Pythonic interface, and
> I don't understand the question about external libraries.
>
> However, Tkinter not most people's favorite, because the widgets look
> crude, they don't resemble the native widgets of any popular platform,
> and the widget set is somewhat limited.
>
> That suggests you're not asking the right questions.
>
> I use Tkinter because the Python gui's I've built so far have been for
> straightforward functionality purposes without being fancy.  However,
> if I were doing something for wide distribution and wanted it to look
> sharp, at this point I think I'd go for PyGtk despite the preference
> of many for wxpython.
>
> Finally, don't overlook the possibility of embedding a basic web
> server in your app, and having the user communicate with it through a
> web browser.  That turns HTML into your gui, which is very easy to
> program.  It also lets you easily handle remote clients, multiple
> concurrent clients, etc, and gives users a familiar and intuitive
> interface.
> -- 
> http://mail.python.org/mailman/listinfo/python-list
>




More information about the Python-list mailing list