Help with implementing callback functions using ctypes

Dan Stromberg drsalists at gmail.com
Thu May 23 23:26:28 EDT 2013


On Wed, May 8, 2013 at 10:54 PM, dieter <dieter at handshake.de> wrote:

> jamadagni <samjnaa at gmail.com> writes:
> > ...
> I cannot help you with "ctypes". But, if you might be able to use
> "cython", then calling callbacks is not too difficult
> (you can find an example in e.g. my "dm.xmlsec.binding").
>
> Note, however, that properly handling the GIL ("Global Interpreter Lock")
> may be of great importance when the Python/C boundary is crossed --
> at least when you intend to use your code in a multi thread environment.
>

Cython is good.

So is the new cffi, which might be thought of as a safer (API-level)
version of ctypes (which is ABI-level).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20130523/e0519f3b/attachment.html>


More information about the Python-list mailing list