Aaah, this it it! Thank you very much...
Alex On Dec 4, 2007 11:49 AM, Diez B. Roggisch <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > > 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? > > Do you have this directory structure? > > package/__init__.py > test.py > > > Only then (with the __init__.py in place, it can be empty) package will be > recognized as such. > > Diez > -- > http://mail.python.org/mailman/listinfo/python-list >
-- http://mail.python.org/mailman/listinfo/python-list