[Tutor] Using C in python
Stefan Behnel
stefan_ml at behnel.de
Wed Mar 25 23:36:16 CET 2009
amit sethi wrote:
> what are the ways in which i can use C in python programs .
Here is a short example that uses Cython to call a couple of C functions in
OpenGL and libc ("math.h"). The functions are declared in the "cdef extern"
blocks at the top.
http://misc.slowchop.com/misc/browser/muckaround/cython-game-optimise-tutorial/fast_circles.pyx
See:
http://cython.org/
Stefan
More information about the Tutor
mailing list