relative import broken?

Sam landofdreams at gmail.com
Thu May 1 01:46:24 EDT 2008


> I didn't look it up myself, but maybe a __init__.py file is missing
> so that it can be recognised as a package.

No, every single one (S, B, and W) has its own __init__.py

> >> > in u.py Python gives "ImportError: No module named S".
>
> >> A silly question: is the directory that contains "S" in PYTHONPATH or
> >> in sys.path?
>
> > It's in sys.path.
>
> "S" or its parent directory?

I added r'C:\Users\Myname\S' to sys.path. Is this the correct usage?

Sam



More information about the Python-list mailing list