Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > 0a30b3a9f9f116957655e4520b1f2301 > files > 493

python-cython-0.19.1-4.mga4.x86_64.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.