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

Olivier Voyer olivier.voyer at gmail.com
Tue Nov 15 16:42:34 CET 2011


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

I just need a way to have some sort of modularity within my application. I
cannot split my main project into smaller projects, it would require a huge
amount of time.

On Tue, Nov 15, 2011 at 10:20 AM, Jim Bosch <talljimbo at gmail.com> wrote:

> On 11/15/2011 10:00 AM, Olivier Voyer wrote:
>
>> Jim, thank you for your answer.
>>
>> What if I have this big C++ project that I cannot split in multiple
>> smaller projects? I have no choice but to create a big Python module
>> exposing all the functions/classes? What is the common practice?
>>
>>
> It sounds like you just want to make a Python package - a directory with
> an __init__.py file that contains all your submodules, which can each be
> compiled separately.
>
> Is there some reason you felt you needed to put all the modules in the
> same pyd file?
>
>
> Jim
> ______________________________**_________________
> Cplusplus-sig mailing list
> Cplusplus-sig at python.org
> http://mail.python.org/**mailman/listinfo/cplusplus-sig<http://mail.python.org/mailman/listinfo/cplusplus-sig>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20111115/c6ac964c/attachment-0001.html>


More information about the Cplusplus-sig mailing list