[pygtk] could not create GladeXML object
Rebecca Rebhuhn-Glanz
rrebhuhnglanz at gmail.com
Fri Jul 11 23:34:50 WST 2008
Hi,
I'm using pygtk on Fedora, and have been trying to get a Glade window to be
run from Python. The program is the following:
#!/usr/bin/env python
import pygtk
pygtk.require('2.0')
import gtk
class Pyjama:
'''This is the the class for the main window for Pyjama.'''
def __init__(self):
self.gladefile="pyjama.glade"
self.wTree=gtk.glade.XML(self.gladefile)
self.window=self.wTree.get_widget("Pyjama")
if (self.window):
self.window.connect("destroy",gtk.main_quit)
def main(self):
gtk.main()
if __name__ == "__main__":
pyj=Pyjama()
pyj.main()
However, when I try 'python pyjama.py', I keep getting the error:
(pyjama.py:13843): libglade-WARNING **: could not find glade file
'pyjama.glade'
Traceback (most recent call last):
File "pyjama.py", line 38, in <module>
pyj=Pyjama()
File "pyjama.py", line 29, in __init__
self.wTree=gtk.glade.XML(self.gladefile)
RuntimeError: could not create GladeXML object
Am I missing something, either software or a module I need to import?
Thanks,
Rebecca R.G.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20080711/deae7a26/attachment.htm
More information about the pygtk
mailing list