On 05.11.2012 15:14, Xavier Morel wrote:
Such as segfaulting the interpreter. I seem to reliably segfault everything every time I try to use ctypes.
You can do that with C extensions too, by the way. Apart from that, dependency on ABI is more annoying to maintain across platforms than dependency on API. Function calls with ctypes are also very slow. For C extensions in the stdlib, Cython might be a better choice then ctypes.
ctypes might be a good choice if you are to use a DLL on your own computer. Because then you only have one ABI to worry about. Not so for Python's standard library.