distutils and ctypes
"Martin v. Löwis"
martin at v.loewis.de
Tue Jan 9 23:45:51 CET 2007
Robert Kern schrieb:
>> Not sure it's stupid, but I wonder why you want to use ctypes. What's
>> wrong with extension modules?
> What's wrong with ctypes? They're both valid, useful approaches to connect to C
See the original posting. Distutils doesn't support building arbitrary
shared libraries, but does support building extension modules.
Furthermore, extension modules are more type-safe and more expressive
than loading shared libraries through ctypes. IMO, you may consider
using ctypes as a last resort - if you have the chance for a
well-engineered solution, write a compiled wrapper.
More information about the Python-list