c++ - Create a Python3 module at runtime while initialize an embedded Python -
we have dll implements custom programming language. want adding support python language keeping same code "api function".
i have succefully embedded python in dll, i'm approaching problem expose old function python module.
now dll doesn't expose api function interface function it's installed (as function pointer) language engine. in way it's impossible create new python module (a new dll). need keep compatibility old method...
it's possible create (and install) @ runtime module defined in same dll python located?
i think calling pyinit_xxxx method after pyinitialize();
i've solved using code before py_initialize();
/* add built-in module, before py_initialize */ pyimport_appendinittab("xxx", pyinit_xxx);
Comments
Post a Comment