[Distutils] import problem using setuptools (resend without html)

Phillip J. Eby pje at telecommunity.com
Tue May 15 18:29:56 CEST 2007

At 05:37 PM 5/15/2007 +0200, henk-jan ebbers wrote:
>Thanks for your response.
>Yes, these are not the real names.
>My situation is (using real names, but using only relevant files):
>         engine.py
>         transform.py
>         botslib.py
>         __init__.py
>         /usersys/
>              __init__.py
>               /mappings/
>                     __init__.py
>                     02ordersedi2aperak.py
>engine.py is the start point.
>engine.py imports botslib.py (initialises global), imports 
>transform.py and starts function  from  transform.py
>transform imports botslib.py, imports usersys.mappings.02ordersedi2aperak.py
>usersys.mappings.02ordersedi2aperak.py  imports botslib.py->in this 
>import it is initialised again.

Ah, then your code has a bug.  It should be importing bots.botslib, 
instead (e.g. "from bots import botslib" instead of "import botslib").

It appears that you also either have the bots/ directory somehow 
appearing on sys.path (where it *should not be*!) OR you have another 
copy of botslib.py on sys.path.

More information about the Distutils-SIG mailing list