passing callback function to c-extension

Diez B. Roggisch deets_noospaam at
Wed Jan 14 17:45:08 CET 2004


> A Python function is just a regular Python object, so it is represented at
> C level by a PyObject*. To call it from C, just use one of the
> PyObject_Call functions - see

Thanks - works like a charm. I'm now looking for a way to ensure that the
passed object is actually a callable one - and how to throw exceptions. But
I just started looking for that, so I'll be back if I really need help.


More information about the Python-list mailing list