import python module from C++ code
Arthur Mc Coy
1984docmccoy at gmail.com
Fri Mar 4 11:27:13 EST 2011
More information about the Python-list mailing list
Fri Mar 4 11:27:13 EST 2011
- Previous message (by thread): python xmp toolkit question
- Next message (by thread): import python module from C++ code
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi all, I have a C++ application. I have a .cpp file which is not a main program, but a class where I want to call python script (doSomething.py file). I'm using embed python like in a tutorial here: http://www.codeproject.com/KB/cpp/embedpython_1.aspx But the tutorial is bad. It does not explain howto create python module which they call in their example. doSomething.py file contains two classes, one of them I use externally (its functions). So I need to PyImport_Import(py_module) by name of this py file, but when I try to do that it fails. Please, give me some examples. If needed, I can attach my code as well. Thank you, waiting for anybody's response! Be happy. Arthur
- Previous message (by thread): python xmp toolkit question
- Next message (by thread): import python module from C++ code
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list