[Python-Dev] ctypes is not an acceptable implementation strategy for modules in the standard library?
Sturla Molden
sturla at molden.no
Mon Nov 5 15:47:05 CET 2012
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.
Sturla
More information about the Python-Dev
mailing list