GUIs - A Modest Proposal
Brian Blais
bblais at bryant.edu
Wed Jun 9 13:53:38 EDT 2010
On Jun 9, 2010, at 7:16 , ant wrote:
> 1 Although a few advocates of Tkinter have spoken in favour of it,
> most seem to think that:
> It's not particularly elegant, either in its use or its
> implementation with Tcl/Tk
> Not many people use it anyway, so why bother?
>
> 2 Most people who have used a GUI have some investment in it. So
> arguments about which one is best tend to be
> partial and not wonderfully constructive.
In this whole discussion, I haven't seen anyone mention wax (http://
zephyrfalcon.org/labs/wax_primer.html)
I know that it is not being supported anymore, but the philosophy is
something we can get behind. I have done a fair amount of GUI
programming, and from my personal experience tkinter seems a bit
clunky, and there are some really annoying things (like running a
program from the commandline in OS X which launches a GUI has the
window appear *behind* the terminal program) which make it
impractical for my personal use. Up until recently Qt had odd
license issues, so I leaned toward wx which does not have a very nice
python interface. Much of wax, however, is a thin wrapper around wx,
and is usable even now and is much easier and much more pythonic.
The nice thing about it is that, being a thin wrapper, you can have
all of the power of wx if you want to. From a work-flow standpoint I
often find myself doing everything in wax and then running into a
part of wx that hasn't been wrapped, so I use the ugly wx code within
my wax code for a while and later make the wrapper clean.
I wonder if that sort of philosophy would work: a really nice and
clear, pythonic wrapper around a sophisticated, complex, and complete
GUI framework. It should be thin enough that the underlying GUI
library can be called directly, however, or its usefulness will be
greatly diminished. Depending on how it is designed, it might even
be possible to have a multi-framework wrapping, so that someone could
have a Qt-based wrapper, and another using the same module choose to
have it wrap wx.
I think the codebase for wax would be a very nice start to the
discussion, because it is already almost usable. It is already very
close to what I would consider an ideal GUI framework.
> 5 I should stop pontificating, and write code. If it's better than the
> existing, people will use it and it will
> become the standard.
I guess that answers that one! :)
bb
--
Brian Blais
bblais at bryant.edu
http://web.bryant.edu/~bblais
http://bblais.blogspot.com/
More information about the Python-list
mailing list