How to use internal python c funtions, from python code

dieter dieter at handshake.de
Fri Dec 11 03:47:20 EST 2015


srinivas devaki <mr.eightnoteight at gmail.com> writes:

> but still I think it would be cool to be able to access internal c
> functions without any fuss. I can use such feature with heapq too(sift
> operations),

Have a look at "Cython". It is a compiler which compiles
a language similar to Python with special extensions for an efficient
interface to "C" and "C++" into "C"/"C++" source which then can be built
into a Python extension module and used from Python like any other
Python module.

In a "Cython" source, you can quite easily use C functions, among
others C functions defined by Python itself.




More information about the Python-list mailing list