Python and GUI
Paul McNett
p at ulmcnett.com
Mon May 21 12:50:04 EDT 2007
sdoty044 at gmail.com wrote:
> Just wondering on what peoples opinions are of the GUIs avaiable for
> Python?
Python has, I believe, 4 compelling choices for GUI library: Tkinter,
wxPython, PyQt, and PyGTK. Like everything in life, each has their
relative merits and downsides. Briefly, here are my feelings on each,
but I'm mostly versed in wxPython.
Tkinter:
Pros: comes with Python out of the box; terse; easy
Cons: owner-drawn (not-native OS widgets); limited in out-of box
functionality; kind of ugly
wxPython:
Pros: easy to install binary on all platforms, active development,
active friendly community of contributors, native os base widgets on all
platforms.
Cons: hard to build from source on all platforms, everything but the
kitchen sink comes with it, and some things are pretty buggy still or
abandoned.
PyQt:
Pros: looks good on all platforms, easy to install and use.
Cons: licensing issues require you to understand lots of specifics;
owner-drawn widgets.
PyGTK:
Can't comment because I haven't used it. The major con in my mind is
that (I think) you need the Gtk library to be installed on all
platforms, so on OS X / Windows the widgets won't look platform-native.
> All I am doing is prompting users for some data (listbox, radio
> buttons, text box, ect...). Then I will have some text output, maybe
> a scrolling text message as things are happening.
I think each of the GUI libraries would be able to handle this easily.
> I have some minor things I need to do, for example, if Checkbutton X
> is clicked, I need to disable TextBox Y, and I would like to display
> the scrolling text (output)
Again, this is simply responding to events as they happen. You set up a
callback function with your reactive code, and tell the GUI library to
call that function when the event occurs.
> Ultimately, is it worth downloading and learning some of the packages
> avaiable for Python, or should I just stick to the Tkinter stuff that
> is included.
I think everyone should use wxPython, but I'm biased.
> More specifically, has anyone used the Qt stuff for python, easy to
> use?
I've used it and it is easy, yes. Relative ease I can't answer though,
because I find wxPython extremely easy due to depth of use over the years.
Shameless plug: consider using Dabo on top of wxPython - we feel it
makes wxPython even easier and more pythonic, but admittedly there's a
bit of a learning curve there too. Even though Dabo is a full
application framework originally meant for desktop database
applications, it is modular and you can choose to only use the UI
bits... http://dabodev.com
--
pkm ~ http://paulmcnett.com
More information about the Python-list
mailing list