On 22 Jun 2001, Federico Di Gregorio wrote:
> On 22 Jun 2001 09:40:17 -0700, Frank Miles wrote:
> [snip]
> > I have a _gtk.pyd in c:\windows\system. It still only imports on the 2nd try.
> > If that was the only thing wrong, it would be easy to live with, simply use
> > a try: import .. , except: import .. There's something more seriously wrong,
> > though. When I try the simple script (based on a tutorial):
> >
> > #!/usr/bin/env python
> > try:
> > from gtk import *
> > except:
> > from gtk import *
> > window = GtkWindow()
> > window.connect('destroy', mainquit)
> > window.show_all()
> > mainloop()
> >
> > the following error message is returned:
> > NameError: There is no variable named 'GtkWindow'
>
>
> this one bited me too when trying to install python-gtk on win32. it
> does *not* import correctly, you get an empty module. i don't know if
> this is a python problem on win32 or something else... you only need to
> copy the .pyd files to your python installation Lib directory and you're
> done.
Unfortunately that doesn't do it either. I've tried both the immediate python
directory (which is where pg.pyd appears) and the Lib subdirectory. The
above error message persists.
> > It would appear that gtk is still not fully accessible. This is with
> > Python2.0, and gtk from the gimp20001226.exe installer. Similarly, libglade
> > appears to import (again, on the second try), but when I try to load a simple
> > glade file:
> > self.widgets = libglade.GladeXML('simple.glade')
> > ...python returns an attribute error regarding GladeXML. I tried substituting
> > the full path name for 'simple.glade' but this did nothing. {This same simple
> > app and glade file work fine in Linux}.
>
> where did you get _libglade.pyd? it is not distributed with gimp nor
> python-gtk port...
I don't have one. Not to seem stupid, but how could I know that one was necessary?
Many other modules don't seem to have one. I also note that there are a number
of pyc files. I had been assuming that by using pre-packaged software that I would
save a lot of time, particulary since I don't have all the Cygwin tools installed.
Sigh... I had thought when I downloaded the libglade compiled for win9x from:
http://hans.breuer.org/ports/default.htm
..my default assumption was that it would be 'complete'. I did add libglade.py from
my Linux box, but clearly that isn't enough.
Thanks for the idea, Federico!
-frank
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk