[TriLUG] Python site-packages problems on FC3

Brian Weaver cmdrclueless at gmail.com
Wed May 25 10:07:46 EDT 2005


OK, Google is not helping me out here and neither is the python book
that I have.

I've written some python code that does what I need it to do. It's
working fine when it's all in the same directory. Assume for
discussion sake that I have three file X.py, Y.py, and Z.py that
contain code that I import into the main python program.

I wanted to move the three modules into a namespace, say 'ns'. So I
made a directory '/usr/lib/python2.3/site-packages/ns' and move the
three py files there. Then I modified my main routine to import
'ns.X', 'ns.Y', and 'ns.Z' from simply 'X', 'Y', and 'Z'.

Now python cannot seem to find the imports. Anyone got any suggestions
on how I can resolve the problem?

Thanks

-Weave



More information about the TriLUG mailing list