On Thu, Feb 04, 2010 at 05:53:16PM +0100, Riccardo-Maria BIANCHI wrote: > 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
In package/__init__.py: import src.mod1 as mod1 import share.mod2 as mod2 And then you can use just one "import package" statement. If you want src and share to be separately installable then it gets more complicated (you'd need namespace packages etc), but why complicated when simple works? Regards Floris -- Debian GNU/Linux -- The Power of Freedom www.debian.org | www.gnu.org | www.kernel.org _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig