python + glade problems
I am running Ubuntu 6.06 and am trying to create a simple gui with glade and python. I believe I have all the packages that I need installed, but I am running into an error that says "global name 'libglade' is not defined". The code that I am using is below. The gui is simply a window with a single label. The relevant packages that I have installed are python, python-gtk2, python-glade2, glade, libglade2-0. The error comes up on the line: "self.widgets = libglade.GladeXML ('pyglade.glade', "window1")" Does anyone know why I am getting this error?
#!/usr/bin/env python import gtk, gtk.glade class GladeHandlers: passclass WidgetsWrapper: def __init__(self): self.widgets = libglade.GladeXML ('pyglade.glade', "window1") self.widgets.signal_autoconnect(GladeHandlers.__dict__) def __getitem__(self, key): widgets = WidgetsWrapper()return self.widgets.get_widget(key) gtk.mainloop () |
You need to install libglade through synaptic and then it will work
|
All times are GMT -5. The time now is 03:20 PM. |