[clug] finding and settting the python include path

Simon Burton simon at arrowtheory.com
Wed Feb 11 07:39:34 GMT 2004


On Wed, 11 Feb 2004 18:23:21 +1100
"Gough, Chris" <Chris.Gough at cit.act.edu.au> wrote:

> > From: Michael James (Wednesday, 11 February 2004 5:08 pm) wrote:
> > 
> > Any python hackers care to give a brief tute on includes?
> > 
> > I have a python application that is not finding
> >  an included file despite the fact that it's there,
> >  installed from a Suse 9.0 RPM.
> > 
> > /usr/lib/python2.3/site-packages/gtk-2.0/gnome/gconf.so
> > 
> 
> are you unsuccessfully trying to 'import gnome'? site-packages is usually in
> PYTHONPATH, so you should be able to 'import gtk-2.0' no problems (except I
> don't know how the full stop in the package name is going to affect things).
> 
> your gtk-2.0 seems to be a 'package', a module of modules. You should be
> able to 'from gtk-2.0 import gnome' or 'import gtk-2.0.gnome' without

hmm, i don't think so: package names need to be a valid identifier, which excludes
minus signs and dots. Looks like the path needs some hacking.

Simon.

-- 
Simon Burton, B.Sc.
Licensed PO Box 8066
ANU Canberra 2601
Australia
Ph. 61 02 6249 6940
http://arrowtheory.com 


More information about the linux mailing list