I am using the Python 3 C API to interface with some Python code.
I have instantiated a Python object from C++ using PyObject_Call
and I have been able to modify some of its attributes using PyObject_SetAttrString
. One the attributes I would like to modify is a callback function, how can I instantiate a Python object from one of my C++ functions?