How is GUI programming in Python?

bockman at bockman at
Wed Apr 16 09:40:44 CEST 2008

On 11 Apr, 20:19, Rune Strand <rune.str... at> wrote:
> On Apr 10, 3:54 am, Chris Stewart <cstewart... at> wrote:
> ...
> > Next, what would you say is the best framework I should look into?
> > I'm curious to hear opinions on that.
> GUI-programming in Python is a neanderthal experience. What one may
> love with console scripts is turned upside-down.  Projects like Boa
> Constructor seemed to be a remedy, but is not developed. The Iron-
> Pythonistas has a very promising RAD GUI-tool in the IronPython -
> Studio, but if you're non-
> Iron, only sorrow is left - unless you fancy creating GUI in a text-
> editor. Something I consider waste of life.

If you refer to lack of GUI designer, every toolkit usable by python -
barring Tkinter - has a GUI
designer wich can be used:

pygtk -> Glade
pywx -> wxDesigner, rxced, ...
pyqt -> QDesigner, ...

All can generate python code and/or generate files that can be used by
python program to
create the whole GUI with a few function calls (e.g. libglade ).

If you refer to the lack of visual programming ala visualstudio or
JBorland, you might be right,
but I personally found that visual programming makes for very
unmaintenable code, especially if you have to
fix something and you don't have the IDE with you (and this has
happened many times to me).
Therefore I now prefer a clean separation between the GUI (described
in someting like glade files or .xrc files)
and my code.

BTW, once learned to use the right layout managers, even building a
GUI from scratch is not such a PITA, since you
don't have to manually place each widget anymore, but only define the
structure of packers and grids and then
adjust borders and such with some -limited IME - experimentation. I
know people that prefer this approach to any GUI builder, having
developed their own little library to help reducing the boilerplate
(and in Python you can do nice things with decorators ans such ... ).

So maybe yes, in python you might not have the fancy world of visual
programming, but neither are deprived of tools
that make your work easier.


More information about the Python-list mailing list