importing modules symbols from packages.

Anton Muhin antonmuhin at sendmail.ru
Thu May 22 11:18:24 EDT 2003


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