Problems with import

Alexander Dietz Alexander.Dietz at astro.cf.ac.uk
Tue Dec 4 06:39:34 EST 2007


Hi,

I have some problems when importing a library. Suppose I have a directory
/home/user/pythonlib/package in which I have a python-library called test.py.
Now I want to import that, so I put the following directory into the
PYTHONPATH: /home/user/pythonlib and in my main python script I put:

from package import test.

BUT I get an error:

ImportError: cannot import name test

So how can I test and check what is going on, why python does not find
the library?


Thanks
  Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20071204/04e60e85/attachment.html>


More information about the Python-list mailing list