Donnal Walter wrote:
In principle, however, I also agree wholeheartedly with the
motivations and goals of the Anygui project.
Now that you have brought this up, I have to ask...Why?
From the anyGUI web page:
The purpose of the Anygui project is to create an easy-to-use, simple,
and generic module for making graphical user interfaces in Python. Its
main feature is that it works transparently with many different GUI
packages on most platforms.
This sounds nifty, but...
I can think of a few reasons why one would choose a particular GUI
toolkit:
A) You like the API
B) It has the features you need
C) It works on the platforms you need to use it on
D) Others like licensing, etc. (I'm going to ignore this at the moment)
As far as I can tell, what anyGUI is doing is trying to provide a nice
API that will work with a variety of back ends, but why would you want a
variety of back ends? People use different toolkits for the above
reasons, so:
A) is negated, you are using hte anyGUI api, so you don't care about the
API of the underlying toolkit.
B) is also negated, you have the feature set of anyGUI. However, anyGUI
is by design going to have to be a lowest common denominator feature
set, or re-write a bunch of widgets in a bunch of tookits..anyone what
to re-write the tkCanvas in wxPython, PyQT, JAVA Swing, FLTK, etc,
etc....(and the wxGrid in all the other toolkits?) And what language
will you re-write it in? If you write it in Python, you will probably
have perfomance problems, if you write in C-C++, you have a whole lot of
work to do!
C) this is important, as you might get more platform options, but what
this means is that on some platforms you are going to have a whole lot
of layers:
AnyGui->wxPython->GTK->Xlib
As a matter of fact, the AnyGUI wxPython port seems the oddest to me: if
you can have anyGUI wrap Win32 and GTK (and presumably Motif and Mac if
you really wanted) what's the point of wxPython?
Why this bugs me is that I, too, would really like a GUI toolkit that is
powerfull, flexible, has a nice Pythonic API, and works on lots and lots
of platforms...I just don't see anyGUI as the way to get there. In fact,
wxPython is most of these already, and if the effort put into anyGUI
were put into wxPython, we could have all that so much sooner.
If people wanted an API for wxPython that is more Pythonic (and this
would be a good thing), you could write a thicker set of wrappers: it
would be less work than anyGUI. In fact, I suppose that is what the
PythonCard project is already doing.
If you want a widget (like TK's canvas) that wxPython doesn't have, you
can write it in wxPython, or write it in C++ wxWindows, it will still be
less work than writing it in a whole slew of toolkits.
Another real advantage of wxPython is that wxWindows is wrapping the
various native toolkits at the C++ level, which should make for better
performance in various ways, and most of it has been done for a number
of platforms already.
I just don't see what is gained by anyGUI; maybe someone can enlighten
me!
-Chris
···
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker@noaa.gov