Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > 78c129e4a46a64625b53d61bd2b90fab > files > 324

python-cython-0.15-0.1mdv2010.2.i586.rpm

This example demonstrates how you can wrap a C API
that has a callback interface, so that you can
pass Python functions to it as callbacks.

The files cheesefinder.h and cheesefinder.c
represent the C library to be wrapped.

The file cheese.pyx is the Pyrex module
which wraps it.

The file run_cheese.py demonstrates how to
call the wrapper.