PythonCallbackObject

class PythonCallbackObject

Bases: CallbackObject

This is a specialization on CallbackObject to allow a callback to directly call an arbitrary Python function. Powerful! But use with caution.

Inheritance diagram

Inheritance diagram of PythonCallbackObject

PythonCallbackObject(PyObject *function = (&::_Py_NoneStruct))
PythonCallbackObject(PythonCallbackObject const&) = default
static TypeHandle get_class_type(void)
PyObject *get_function(void)

Returns the function that is called for the callback.

void set_function(PyObject *function)

Replaces the function that is called for the callback. runs. The parameter should be a Python callable object.

bool validate_ptr(void const *ptr)