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.
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to