Hi all,

I'm trying to get up and running with pygtk and glade. I've done some
basic scripting with python, but that's about it, so this is new to me.

I've got Redhat 9 system, python 2.2, pygtk2, glade2

Here's my problem, I got glade going, and am trying it out with the
simple HelloWorld script I found at a tutorial site. I used glade to
make a window with label in it, and then ran the following script:

#!/usr/bin/env python

import gtk, libglade

# We put all of our gtk signal handlers into a class.  This lets us bind
# all of them at once, because their names are in the class dict.
class GladeHandlers:
    pass

class WidgetsWrapper:
    def __init__(self):
        self.widgets = libglade.GladeXML
('/home/me/wsdocs/python/glade/Projects/HelloWorld/helloworld.glade',
"window1")
        self.widgets.signal_autoconnect(GladeHandlers.__dict__)
    # Gives us the ability to do: widgets['widget_name'].action()
    def __getitem__(self, key):
        return self.widgets.get_widget(key)

widgets = WidgetsWrapper()

gtk.mainloop ()

When I run it, I get:

(HelloWorld.py:7667): GLib-GObject-WARNING **: cannot register existing
type `PyGtkGenericTreeModel'

(HelloWorld.py:7667): GLib-GObject-CRITICAL **: file gtype.c: line 1941
(g_type_add_interface_static): assertion `G_TYPE_IS_INSTANTIATABLE
(instance_type)' failed

(HelloWorld.py:7667): GLib-GObject-WARNING **: cannot register existing
type `PyGtkGenericCellRenderer'
Fatal Python error: could not import _gtk

I have the _gtkmodule.so module on my machine, but have no earthly idea
how all the various packages need to be configured.

As far as I can tell, these are the relevant libraries and packages on
my machine:
gtk2 is installed in /usr/lib, and directories 'immodules' and 'loaders'
under /usr/lib/gtk-2.0
gtk+ installed in /usr/lib (these files are libgdk-1.2 and libgtk-1.2)
pygtk2 installed in /usr/lib/python2.2/site-packages (pygtk.pth,
pygtk.py, pygtk.pyc and pygtk.pyo
        also in /usr/lib/python2.2/site-packages/gtk-2.0 (atkmodule.so,
gobjectmodule.so, pangomodule.so)
        also in /usr/lib/pythong2.2/site-packages/gtk-2.0/gtk/ (__init__.py*,
_gtkmodule.so, compat.py*, kysyms.py*)
pygtk-libglade installed in /usr/lib/python2.2/site-packages/
(_libglademodule.so, libglade.py*)
pygtk2-libglade installed in
/usr/lib/python2.2/site-packages/gtk-2.0/gtk/glademodule.so
Under /usr/lib/pkgconfig have (pygtk-2.0.pc, gdk.pc, gtk+.pc, various
gdk and gtk packages include gtk+-2.0.pc

If anyone can help me figure out how to get things moving along, I'd be
most grateful. Looks like a great way to program, but I don't understand
how all the various libraries relate in linux to figure this out.

Thanks,
wil snyder

_______________________________________________
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