Dear all,

currently, I am revisiting an problem I had with my project some time ago: due 
to several external constraints, I need to do some work if certain member 
functions of my classes are called from python. Initially, I put the additional 
code in the wrappers which were exposed with boost::python. Unfortunately, I 
also have cases were objects are instantiated in C++ parts of the code and then 
handed to python-space, which results in problems when the member functions 
mentioned above are called. I described the problem already earlier, cf. 
http://mail.python.org/pipermail//cplusplus-sig/2012-September/016753.html.

Unfortunately, I never found a solution to this problem. Can I somehow execute 
additional code when member functions are called from python, even if the 
object was instantiated in C++ (i.e. is not a wrapper class). Is there a way to 
use a global function for this? I cannot touch the C++ code too much, although 
a "friend" declaration might be possible.

Thanks in advance for your help!

Best regards,
Karl Bicker
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to