I'm not sure that Boost.Python implements the dereference ** operator, as stated, but you can still use the Python C-API to execute the method you are installed on, as described here .
Here is a prototype solution:
After converting the return value from PyObject_Call to the formal boost::python::object you can either return it from your function or just forget about it, and the new link returned by PyObject_Call will be automatically deleted.
For more information on wrapping PyObject* as boost::python::object see the Boost.Python manual. More precisely, at this link the end of the page .
source share