Hey, get this!

Bernhard Herzog bh at intevation.de
Wed Feb 2 09:48:20 EST 2005


Steve Holden <steve at holdenweb.com> writes:

> What *I* would like to know is: who is allowing the import of bsddb.os,
> thereby somehow causing the code of the os library module to be run a
> second time.

I would guess (without actually running the code) that this part is
responsible:

>          if package:
>              module.__path__ = sys.path

You usually should initialize a package's __path__ to an empty list.
The __init__ module will take care of modifying it if necessary.

   Bernhard

-- 
Intevation GmbH                                 http://intevation.de/
Skencil                                           http://skencil.org/
Thuban                                  http://thuban.intevation.org/



More information about the Python-list mailing list