[C++-sig] Passing a C++ object to a python script

David Anderson david.anderson at calixo.net
Sat Dec 6 17:37:24 CET 2003


I am currently attempting to embed python in a C++ application of mine. 
I have looked around at what can be acheived using various libs, and I'd 
like to try out Boost.Python. My application would require two things:

1) Being able to pass a reference to a C++ object to a python function 
and have it modify this instance of a class (which would have been made 
visible to python using boost). That is, when the python function 
returns, the C++ object should have been altered by it.

2) Being able to use as transparently as possible python extended 
classes (a python class extending an exported C++ base class) from the 
C++ code.

Could someone give me pointers as to how I could accomplish this? I have 
looked through the Boost.Python documentation, as well as some archive 
mails in this list, but have not found exactly what I need...

Thanks in advance
David Anderson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20031206/77ca12be/attachment.pgp>

More information about the Cplusplus-sig mailing list