From: David F. <dav...@gm...> - 2012-04-27 13:34:15
|
Excerpts from Yoann Chaumy's message of ven. avril 27 13:58:37 +0200 2012: Hi, > But my aim is to create a C++ instance, and pass it to my python script. The script will modify the instance and return it to the C++ application So, your 'main' function is in C++, and you want to embed Python? The normal use of Swig is to have the 'main' function in Python, and to extend Python. The words extending and embedding refers to: http://docs.python.org/extending/ If I understand, you need extending embedded Python: http://docs.python.org/extending/embedding.html#extending-embedded-python I think it would be possible to use the wrapper code generated by Swig to do that, but the only link I found on the web to do that is old (2002): http://lahosken.san-francisco.ca.us/frivolity/prog/embswig/doc.html |