[C++-sig] Multiple modules in a single pyd

Wichert Akkerman wichert at wiggy.net
Tue Nov 15 16:47:55 CET 2011


On 11/15/2011 04:42 PM, Olivier Voyer wrote:
> Yes, that's exactly what I want to do. But, from what I understand, 
> each module or submodule (.py file) must link to its own .pyd file, ie 
> module1.py -> _module1.pyd, module2.py -> _module2.pyd.
>
> What I would really love to have is:
>
> myPackage/
> myPackage/__init__.py
> myPackage/module1.py -> linked to _mySingleAPI.pyd
> myPackage/module2.py -> linked to _mySingleAPI.pyd

Why not make mySingleAPI.pyd a single extension myPackage.pyd module 
that creates myPackage, myPackage.module1, etc. all at once? You don't 
need to have separate files for each module if you do that.

Wichert.



More information about the Cplusplus-sig mailing list