calling python functions from c

Eric Brunel eric.brunel at
Mon Nov 24 10:22:10 CET 2003

wesley henwood wrote:
> The documentation for doing this can be found at:
> The only part I can't get is how to pass a pythong function object to a 
> c function.  How does one do this?

I'm not sure I understand the question, since the document you give above *does* 
have a Python function passed to a C function. If you wonder what type to set 
for Python callbacks, it's just PyObject*: in Python, functions are just objects 
like every other ones, so they have the same C type.

- Eric Brunel <eric dot brunel at pragmadev dot com> -
PragmaDev : Real Time Software Development Tools -

More information about the Python-list mailing list