[Distutils] modules in different folders but under same namespace

Riccardo-Maria BIANCHI riccardo.maria.bianchi at cern.ch
Thu Feb 4 17:53:16 CET 2010


Hi,

I have a package structured like this:


package/__init__.py
    src/ __init__.py
           mod1.py
    share/__init__.py
             mod2.py


Now I can import them as:
package.src.mod1
package.share.mod2

How can I use Distutils to be able to import both of them under the same 
"package" namespace as:

import package.mod1
import package.mod2

?

Thanks a lot in advance for your kind help!

Best regards,

   Ric.




More information about the Distutils-SIG mailing list