GUI Frameworks in Python?
michael at foord.net
Wed Mar 31 09:45:44 CEST 2004
Hugh Macdonald <HughMacdonald at brokenpipefilms.com> wrote in message news:<mailman.116.1080653744.20120.python-list at python.org>...
> On 30 Mar 2004 05:18:58 -0800
> michael at foord.net (Fuzzyman) wrote:
> > 'Programming Python' has an excellent introduction.. so I started with
> > Tkinter thinking that when I hit restrictions I could move onto wx. I
> > haven't yet reached the point where Tkinter restricts me. Whereas
> > there are a couple of widgets missing from the standard distribution,
> > Tkinter *can* be used to make clean and modern looking interfaces.....
> > And the syntax isn't too gawky once you've climbed the initial
> > learning curve.
> For me, the issue with TK is less the restrictions it imposes and more the way of writing it in the first place.
I guess there are two 'warts' :
callback functions are usually called without parameters.
Wrapping the GUI framework in a class gets round this nicely - the
callback function has full access to the class instance attributes.
The second is the way that events are triggered with an event object :
self.searchbox.bind('<Return>', (lambda event: self.search()))
Using a lambda function to trigger a callback function gets round
Once you get used to the pack order with Tk it's remarkably easy to
build GUIs quickly....
I guess for *big* applications some of the 'power' widgets might be
missing from the standard distribution. In that sense wx is
undoubtably more polished and fully featured.... But so far for me -
Tk has more than covered my needs without even exploring extension
widget sets. Apparently one of the more high powered IDEs (I forget
which one) is seamlessly built from Tk widgets.... but you'd never
realise it to look at it - so I guess the potential is there.
> > > GTK: Unknown - I'm looking into it today
> > >
> > Is this Linux only ?
> > (pardon my terrible ignorance...)
> Yeah - it is... I'n only developing for Linux here...
> > > Qt: I have yet to manage to install it on my system
> > >
> > Although *technically* cross platform, windoze users can't get a free
> > version... so I'm never going to bother looking at it...
> That doesn't bother me - everything I'm writing is for in-house use only, and would only ever be run on Linux...
> Thanks for everyones thoughts... I'm actually planning on sticking with wxPython for the moment. I've decided that I can live with the extra few seconds to load up, although I don't like it...
More information about the Python-list