fernando <[EMAIL PROTECTED]> writes:

> Could someone post an example on how to register a python function as
> a callback in a C function?

If I understand correctly, your C function receives a Python function
(as a function object of type PyObject *), which you need to call from
C.  To do that, call PyObject_CallFunction(obj, format, args...) where
format and args are documented in
http://docs.python.org/api/arg-parsing.html.

Does that help?

Also note that there is a dedicated mailing list for the Python/C
API; see http://mail.python.org/mailman/listinfo/capi-sig .
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to