Re: UI toolkits for Python



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@xxxxxxxxxxxxx> 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


.



Relevant Pages

  • Re: Tkinter and Tile
    ... Python programmers looking for a built-in GUI toolkit are told two ... hasn't been the default widget set of *anything* for a long time. ... What effect will this have on Python's Tkinter? ...
    (comp.lang.python)
  • Re: Tkinter / Entry widget problem
    ... So it's either that I use Python 2.5.1, or that I use it on a Mac. ... problem related to the Entry widget in Tkinter. ... widget, I want this widget to contain some default string, to have all ...
    (comp.lang.python)
  • Re: An assessment of Tkinter and IDLE
    ... Python material in progress. ... While I hadn't used it before, I think Tkinter may very well be the nicest interface to Tk next to Tcl's. ... The two main parts that I think Tcl does in a nicer way are event bindings and the fact you can create and geometry manage a widget in one statement, while still keeping a handle to a widget around. ...
    (comp.lang.python)
  • Re: Odd behavior in Python/Tkinter?
    ... Sure I'm listening, but please spare me ... preter, not Python). ... widget, and changes to the widget will be reflected in the variable. ... it to Tkinter to come up with an internal variable name, ...
    (comp.lang.python)
  • Re: Does TKinter Have A Grid ?
    ... tarball now it's just a matter of working out how I use Tcl with Python - ... >> Does TKinter have a Grid widget? ... > If by grid you mean Table widget or Spreadsheet type widget then no Tk ... > widget both Tk 'c' based and Tcl based. ...
    (comp.lang.python)