[XML-SIG] XML-related demo in PyGTk

A.M. Kuchling akuchlin@cnri.reston.va.us
Sat, 24 Oct 1998 23:45:13 -0400


For a lark, I installed part of GNOME on my Linux machine this
weekend.  (GNOME is a graphical desktop environment for X that's
currently in development; see www.gnome.org for information.)

GNOME primarily uses the GTk widget set.  James Henstridge maintains a
Python interface to GTk and to the GNOME libraries, a non-trivial task
since the libraries are constantly changing as they're being
developed.  

	Anyway, I downloaded the Python/GTk interface, and found that
one of the demo programs displays user interfaces from the output of
the GLADE UI builder (
http://www.comp.lancs.ac.uk/~damon/builder/index.html).  GLADE's
output is in XML, and looks like this:

<?xml version="1.0"?>
<GTK-Interface>
<widget>
  <class>GtkWindow</class>
  <name>window1</name>
  <Signal>
    <name>destroy</name>
    <handler>close_window</handler>
  </Signal>
  <title>window1</title>
  <type>GTK_WINDOW_TOPLEVEL</type>
  <position>GTK_WIN_POS_NONE</position>
  <allow_shrink>True</allow_shrink>
  <allow_grow>True</allow_grow>
  <auto_shrink>False</auto_shrink>
 ... etc ...

	The XML parser used is a little ad-hoc one, not xmllib.py or
this SIG's package.  It's an extremely interesting application,
though; one could get a GUI builder for Python out of it.

-- 
A.M. Kuchling			http://starship.skyport.net/crew/amk/
    "My granny says that dying is like going to sleep," Mort added, a shade
hopefully.
    I WOULDN'T KNOW. I HAVE DONE NEITHER.
    -- Mort and Death in Terry Pratchett's _Mort_