import python module from C++ code

Arthur Mc Coy 1984docmccoy at gmail.com
Fri Mar 4 16:53:48 EST 2011


Still need the answer to the question: " howto embed given python file
(which contains python class and its members) into the c++
application ? "

I have to pass the arguments from c++ to python and back so I need to
do conversions. They are ok. Fails PyImport_Import(my_module) call
saying "No module called mymodule". Then I need to create a mymodule
based on given python file (its name mymodule.py). Can it be achieved
using SWIG ?

I'm very curious and looking for some feedback if possible :)
Be happy.

Arthur



More information about the Python-list mailing list