importing modules symbols from packages.
Richard Béneyt
rbeneyt.akis at nerim.fr
Thu May 22 12:54:20 EDT 2003
Ooops ! Clearly, you're right, I guess I'm a bit tired those days !
I meant, of course:
"In modspack2.py, I wrote:
from pack2.spack1.modspack1 import aSymbol"
Sorry.
The code was right and the example false, so actually the problem is
still there.
--
Richard Béneyt
rbeneyt.akis at nerim.fr
Anton Muhin a écrit:
> Richard Béneyt wrote:
>
>> Hi,
>>
>> I'm in trouble with packages imports with python 2.2.1, first here is
>> the directories layout:
>>
>> python-packages
>> |
>> |__ pack1
>> | |
>> | |__ __init__.py
>> | |__ module1.py
>> | |__ module2.py
>> | ...
>> |__ pack2
>> | |
>> |__ __init__.py
>> |__ spack1
>> | |
>> | |__ __init__.py
>> | |__ modspack1.py
>> |
>> |__ spack2
>> |
>> |__ __init__.py
>> |__ modspack2.py
>>
>>
>> and PYTHONPATH is <some_path>/python-packages
>>
>> In modspack2.py, I wrote:
>>
>> from pack1.spack1.modspack1 import aSymbol
>>
>
> Didn't you mean pack2 (not pack1)?
>
> hth,
> anton.
>
More information about the Python-list
mailing list