wxPython
Jonathan Hudson
jh+ubuntu at daria.co.uk
Sat Jan 1 10:15:01 UTC 2005
> One question I still haven't found an answer for however is how to get
> Glade to output python code. I see output options for C,C++ and Ada
> 95. What am I missing?
These days it's customary to use libglade to generate the GUI at run
time from the .glade file, which is language independent. Using pygtk2
and pygtk2-libglade for python.
e.g.
self.glade = gtk.glade.XML(self.glade_path, main_widget_name, domain)
if main_widget_name:
self.main_widget =
self.glade.get_widget(main_widget_name)
else:
self.main_widget = None
self.signal_autoconnect()
to load the widget definitions from the glade file and automagically
connect up the signals.
HTH
-jh
More information about the ubuntu-users
mailing list