[Tutor] GUI Toolkit?

alan.gauld@bt.com alan.gauld@bt.com
Tue, 12 Oct 1999 15:15:19 +0100


> I have decided to begin GUI programming, using Python. 
> All the Python books I have contain information on Tkinter 
> - but all the Tk apps I have used tend to be pretty drab 
> looking, and out-of-date. 

Not quite sure what the out of date bit means but Tk is 
a lowest common denominator toolkit so does suffer in 
its presentation because of that. It is possible to 
create your own widgets with all manner of sexy features
but thats not really where Tk is at its best IMHO.

Have you looked at JPython which might offer a better 
way forward... using Java's GUI vcapabilities but 
programming in Python. 
[Caveat: I haven't actually used JPython myself but that 
seems to be what it's about.]


> I am just using poor applications, or is
> Tkinter outdated? 

A bit of both. Most Tk apps are wrappers around 
commandline tools, they aren't designed with the 
latest and greatest GUI enhancements in mind.
Tk is quick and easy to program which makes it 
ideal for quickly prototyping an idea or making 
a commandline tool easier to use in a GUI age.

But its perfectly possible to create fairly sexy 
GUI apps using Tk, although finding a publicly 
available example isn't easy.

> A guru friend of mine said that Tk is a bad choice - he 
> recommended gtk. 

Gtk is nice (as is Qt which I believe also has 
a Python interface). Again I haven't used it from 
Python, only C++ - and only the tutorial at that.

> What about wxPython? How good is that? 

Dunno. Anyone else?
As a C API it looked OK but again is fauirly 
'lowest common denominator-ish'

> I am primarily concerned primarily with appearence, and ease 
> of use for a newbie, followed by portability (ideally, *NIX, and Windows).

Those two goals tend to be mutually exclusive :-(
The more feature rich an API the harder it gets to use.
The general techniques are similar however and maybe learning 
Tk would be a good start - You can use the knowlege in Tcl or 
Perl as well as Python. Then once comfortable move to GTk 
or JPython later. (depends to some extent if you have previous 
C GUI experience in say Windows MFC, Mac  or X)

Alan G.