[Cython] new FFI library for Python
Sturla Molden
sturla at molden.no
Tue Jun 19 13:58:53 CEST 2012
On 18.06.2012 16:12, Stefan Behnel wrote:
> the PyPy folks have come up with a new FFI library (called cffi) for
> CPython (and eventually PyPy, obviously).
It looks like ctypes albeit with a smaller API. (C definitions as text
strings instead of Python objects.)
Sometimes I think Python and a ffi would always suffice. But in practice
Cython's __dealloc__ can be indispensible, as opposed to a Python
__del__ method which can be unreliable. And Python's module loader
mostly takes care of the common problem of DLL hell.
With a ffi like ctypes or cffi, we don't have the RAII-like cleanup that
__dealloc__ provides, and loading the DLLs suffer from all the nastyness
of DLL hell.
Sturla
More information about the cython-devel
mailing list