could not create GladeXML object

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   pygtk <at> daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
Samuel Abels | 11 Jul 18:09

Re: could not create GladeXML object

On Fri, 2008-07-11 at 11:34 -0400, Rebecca Rebhuhn-Glanz wrote:
> However, when I try 'python pyjama.py', I keep getting the error:
> 
> (pyjama.py:13843): libglade-WARNING **: could not find glade file 'pyjama.glade'

This *may* mean that your Glade file 'pyjama.glade' can not be
found :-).

-Samuel

_______________________________________________
pygtk mailing list   pygtk <at> daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Re: could not create GladeXML object

Thanks for pointing out what I should have noticed. I moved pyjama.glade to the same directory as pyjama.py and it worked.

--Rebecca R.G.

On Fri, Jul 11, 2008 at 12:09 PM, Samuel Abels <newsgroups <at> debain.org> wrote:
On Fri, 2008-07-11 at 11:34 -0400, Rebecca Rebhuhn-Glanz wrote:
> However, when I try 'python pyjama.py', I keep getting the error:
>
> (pyjama.py:13843): libglade-WARNING **: could not find glade file 'pyjama.glade'

This *may* mean that your Glade file 'pyjama.glade' can not be
found :-).

-Samuel


_______________________________________________
pygtk mailing list   pygtk <at> daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Gmane