Re: [OT] pass a C callback function to a cythom module via python
27 Mar
2012
27 Mar
'12
10:03 p.m.
Hi Nadav
I just had a chat with Dag, a core Cython contributor. He mentioned
to me another alternative, which is to encapsulate the callback
function in a class:
https://github.com/dagss/cython-pydata12/blob/master/examples/oointegrate/in...
You can import this class from Python, and pass it along as the
callback object. There may be some work on improving this
functionality in the future, but for now I think that's the cleanest
route (and helps us to avoid ctypes!).
Stéfan
On Tue, Mar 20, 2012 at 1:02 AM, Nadav Horesh
Can you explain in more details how can I implement it? Any case I am attaching an scheme that may clarify my intend. Soon I'll post a code demonstrating the problem.
Thank you, Nadav,
4405
Age (days ago)
4405
Last active (days ago)
0 comments
1 participants
participants (1)
-
Stéfan van der Walt