calling python functions from c

W

wesley henwood

The documentation for doing this can be found at:
http://www.python.org/doc/current/ext/callingPython.html

The only part I can't get is how to pass a pythong function object to a c
function. How does one do this?

_________________________________________________________________
Say “goodbye” to busy signals and slow downloads with a high-speed Internet
connection! Prices start at less than $1 a day average.
https://broadband.msn.com (Prices may vary by service area.)
 
E

Eric Brunel

wesley said:
The documentation for doing this can be found at:
http://www.python.org/doc/current/ext/callingPython.html

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.

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,141
Messages
2,570,813
Members
47,357
Latest member
sitele8746

Latest Threads

Top