Python GUI

Christian Egli christian.egli at alcatel.ch
Thu Aug 12 19:43:45 CEST 1999


>>>>> "Phil" == Phil Hunt <philh at vision25.demon.co.uk> writes:

>>>>> "Paul" == Paul Prescod <paul at prescod.net> writes:

Paul> Glade is a GUI application that allows you to build a window
Paul> visually.
 
Phil> Okay, but I saw a reference somewhere to Glade having a
Phil> declarative file format that could be converted into code to
Phil> build the GUI. I was mostly talking about the declarative file
Phil> format.

Maybe you meant the storage format of Glade which is XML which in turn
can be used with Libglade to build the GUI dynamically.

Paul> Glade does that too, as long as your "favorite language" is
Paul> C. :)

Not only. See below

Paul> I don't understand why you would take a code generation
Paul> approach, though. My professional opinion is that code
Paul> generation is yucky. :) It takes no more effort to write a
Paul> "Parrot reader" for each language -- especially if Parrot uses
Paul> the language's built-in XML support (oops.  scratch
Paul> that). Seriously though, XML aside, why bother with code
Paul> generation when you can just do everything dynamically? Read the
Paul> parrot file and make the objects on the screen. The performance
Paul> shouldn't be much different and the extra dynamicity will make
Paul> your life easier and make the tool cooler to use. "I'll just
Paul> generate a modified parrot file and reload."

AFAIK Libglade does exactly that.

>From the Libglade home page:

Libglade is a library that performs a similar job to the C source
output routines in the GLADE user interface builder. Whereas GLADE's
output routines create C code that can then be compiled, libglade
builds the interface from an XML file (GLADE's save format) at
runtime. This way you can change the look of a program without needing
to recompile.

Currently it supports all the widgets in current releases, together
with support for keyboard accelerators and automatic signal
connection.

It is available from: ftp://ftp.daa.com.au/pub/james/gnome 


-- 
Christian Egli
Phone: +41 1 454-6728, Fax: +41 1 454-6612, http://www.stest.com
Wavetek Wandel & Goltermann, Friesenbergstr. 75, CH-8055 Zuerich




More information about the Python-list mailing list