TJ - 2008-08-05

I've just installed PyDev 1.3.19 into Eclipse 3.3.2 on Linux (Ubuntu Hardy).

I read the installation guide regarding System PYTHONPATH but I think I'm missing something. I'd value some pointers on this.

I added the project "blueman", a Gnome Bluetooth manager, and it imports gobject, gtk, gtk.glade and others in many source files. When the project builds all those imports were reported as unresolved. After reading and searching I figured it was because these are 'system' libraries.

For gobject, which is in the Debian package "python-gobject", it has the shared-object library installed to:

/usr/lib/python-support/python-gobject/python2.5/gtk-2.0/gobject/_gobject.so

and the python files installed to:

/usr/share/python-support/python-gobject

The files there are:

/usr/share/python-support/python-gobject/gtk-2.0/gobject/constants.py
/usr/share/python-support/python-gobject/gtk-2.0/gobject/propertyhelper.py
/usr/share/python-support/python-gobject/gtk-2.0/gobject/__init__.py
/usr/share/python-support/python-gobject/gtk-2.0/gobject/option.py
/usr/share/python-support/python-gobject/gtk-2.0/dsextras.py
/usr/share/python-support/python-gobject/pygtk.py
/usr/share/python-support/python-gobject/pygtk.pth

Now I'm confused - which directory should I add to the System PYTHONPATH, the .so directory or the pygtk.py?

Also, am I correct in assuming that I would add "gobject" to the 'forced builtin libs' list (the name added being the python import name, not the .so filename - which is _gobject) ?

What I have done, which has got rid of the "Unresolved import: gobject" errors is to add "/usr/share/python-support" and "/usr/lib/python-support" to the System PYTHONPATH and "gobject" is in the "forced builtin libs".

PyDev is reporting errors such as "Undefined variable from import: timeout_add" for lines such as:

    self.timer = gobject.timeout_add (100, self.animate)

and many other similar errors for other members of 'gobject' and other imports.

What's going on here, and how do I fix it?