pass callback from python to c++ using boost::python
Ok, I’m still trying to figure this out too, but here’s whats working for me so far: #this is the variable that will hold a reference to the python function PyObject *py_callback; #the following function will invoked from python to populate the call back reference PyObject *set_py_callback(PyObject *callable) { py_callback = callable; /* Remember new … Read more