Hallöchen!

Sam writes:

> On Apr 30, 9:11 pm, Hrvoje Niksic <[EMAIL PROTECTED]> wrote:
>> Sam <[EMAIL PROTECTED]> writes:
>> > I also have a problem with relative import; I can't for the life of me
>> > figure out how to use the damn thing. I think the main problem is with
>> > getting Python to recognize the existence of a package. I have
>>
>> > S/
>> >   p.py
>> >   B/
>> >     b.py
>> >   W/
>> >     pyw/
>> >       u.py
>> >       ws.py
>>
>> > and I'd like to get u.py to import all the other 3 programs. I put
>> > empty __init__.py files in all of the above directories (is this
>> > necessary?), and even manually added the pathway (r'C:\Myname\S') to
>> > sys.path, but when I execute
>>
>> > from S import p
>>
>> > 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?

Tschö,
Torsten.

-- 
Torsten Bronger, aquisgrana, europa vetus
                                      Jabber ID: [EMAIL PROTECTED]
               (See http://ime.webhop.org for further contact info.)
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to