Fred L. Drake, Jr.
fdrake at acm.org
Thu Aug 12 17:13:27 CEST 1999
Phil Hunt writes:
> I think I will have to have a look at Glade. My understanding is that
> it uses its declarative file format to save/load UI definitions that
> people are working on.
A couple of us here have started playing with it, and it's pretty
neat. It does create an XML representation of the project as its own
storage format, but an application can use libglade to load the XML
and create widgets on the fly. The latest release of PyGTK /
gnome-python includes bindings to libglade, and it seems to work
"OK". There are some issues related to Gnome widgets, but otherwise
seems pretty good. (I expect the issues will be resolved fairly
> If Parrot could read/write Glade's format, that would be good, as
> then people could write a UI in Glade and export it to any
> backend that Parrot supports.
That would be neat!
> That is a persuasive argument. One counterargument would be that
> any application that uses that approach would need a built-in
> XML parser and Parrot run-time library, thus creating code bloat;
> however, Parrot is explicitly intended to support multiple back-ends,
> so there is no reason it couldn't support both approaches.
There's also the issue of not wanting to store the user interface
information in an external file; this is probably more of an issue for
commercial software than open source materials, but there are valid
reasons for "locking down" the interface. It could be implemented by
including the XML in the binary as a string or by generating "native"
code to do the right thing.
> > > True; I don't think a parser for Python will be too difficult to
> > > write: my provisional spec only has 12 productions.
> > These specs always start out small. :)
Are you aware of Don Beaudry's "pgen" module? It provides a runtime
Python interface to the parser generator used for Python, so it's easy
to create "Pythonesque" languages fairly easily. If you want an
easy-to-read langauge for Parrot, you might consider that. (I'm not
sure of it's status with respect to current versions of Python; poke
around ftp.python.org:/pub/python/contrib for the latest version.)
Fred L. Drake, Jr. <fdrake at acm.org>
Corporation for National Research Initiatives
More information about the Python-list