relative import broken?
Torsten Bronger
bronger at physik.rwth-aachen.de
Thu May 1 02:09:14 EDT 2008
Hallöchen!
Sam writes:
>> 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?
Try r'C:\Users\Myname'.
Tschö,
Torsten.
--
Torsten Bronger, aquisgrana, europa vetus
Jabber ID: bronger at jabber.org
(See http://ime.webhop.org for further contact info.)
More information about the Python-list
mailing list