RAD with Python

Peter Herndon tpherndon at mindspring.com
Mon Sep 15 17:32:11 EDT 2003


ubaidullahnubar at hotmail.com (Ubaidullah Nubar) wrote in message news:<17d520f6.0309130701.222d09fe at posting.google.com>...

> I will appreciate some more clarification regarding the GUI framework.
> From the wxPython web site, it looks very good but the two tools
> mentioned here
> for easing the development of GUI apps (mojoview and kiwi) are both
> based on GTK.
> 
> Are they fundamentally different or just a matter of style.

Well, pyGTK and wxPython are Python-language wrappers or bindings
around two separate GUI toolkits, GTK+ and wxWindows.  As such, the
code details will wind up being different.  I suspect, though I have
no experience with pyGTK, that differences will be mostly syntactic
and that overall coding thought processes will be mostly similar.  Can
anyone else confirm/deny?
> 
> How easy to switch from one framework to another?
> 

See above answer.

> Which framework supports internationalization better? Do they support
> Right-to-left layouts?

I know that wxPython relies on wxWindow's internationalization
capabilities, which seem to be centered around gettext and friends.  I
do not see anything in the documentation that suggests support for
bidirectional font support.  Seeing as how gettext and GTK+ are both
GNU apps, it should come as no surprise that GTK+ also uses gettext.

> Is there any site that lists the differences/capabilities of each
> framework?

There is a comparison of wxWindows, Qt, GTK+, FOX and fltk at:
http://freshmeat.net/articles/view/928/
which provides an overview of the differences between the various
toolkits.  I know there is a comparison on the wxPython site between
itself and Tk, though you can guess the conclusion from the source.  I
don't know of any comparisons between the Python bindings for the
above toolkits.

> Also, a comparison between Boa Constructor and Glade-2. I haven't seen
> either so am not sure if they are even comparable.

Boa-Constructor is a fully-fledged IDE that includes a code editor,
debugging, and a GUI designer tool.  Boa is based around wxPython, and
also includes substantial support for development for the Zope
application server.  Boa-Constructor is not yet fully mature, but
shows much promise.

Glade is a GUI designer only, that generates XML resource files used
by GTK+ to generate the GUI interface.  As such, it is not directly
comparable with Boa.  PyGTK has support for working with such resource
files.

Interestingly enough, wxGlade is a more-or-less copy of Glade, but for
use with wxPython rather than GTK+, and it generates "cleaner" code
than Boa-Constructor.

> > > How well is Python suited for developing database based applications?

Very well suited.  Python has a standard database interface module
available which makes it easy to connect to just about any database. 
Typically there are multiple drivers available for any given database
from which to choose.  Python itself is extremely easy to write, and
Python wrappers for many different GUI toolkits are available.

> > > 2. There seem to be a number of GUI frameworks available? Which one is
> > > good for use on Windows and Linux?

I've found that wxPython works well cross-platform, and is easy to
use.  I've heard good things about pyGTK and pyQT, but have no
experience with them.

> > > 4. What types of applications are not suitable to be written in
> > > Python?

CPU-intensive applications -- maybe.  Python is not as efficient as C,
so you would be better off writing the application in Python,
profiling it to determine the areas that make the application slower
than is acceptable, and rewriting those modules as C libraries and
calling them from Python.  For what it is worth, I'm currently writing
an application in Python using wxPython that retrieves simple data
from a Sybase Adaptive Server Anywhere database over ODBC, and formats
the data into a report page in generated HTML.  By many orders of
magnitude, the slowest part of the application is the connection to
the database -- the ODBC connection itself.  The Python and wxPython
parts are whiz-bang fast.




More information about the Python-list mailing list