simple(?) Python C module question

Terry Reedy tjreedy at udel.edu
Wed Nov 17 22:42:06 EST 2010


On 11/17/2010 7:25 PM, Mark Crispin wrote:

>> Have you looked at ctypes? It's not suitable for all libraries, but
>> it can often obviate the need to write any C code:
>> http://docs.python.org/release/2.6.6/library/ctypes.html#module-ctypes
>
> Hmm. I don't think that it helps, especially as I don't really want to
> make the consumers of this module know anything about c-client or its
> calling conventions.

For the record, a C library wrapper written in Python with cytpes is 
nearly indistinguishable to users from an equivalent wrapper written in 
C. However, given that you are more comfortable with C than Python and 
have gotten the info you need, stick with that.

-- 
Terry Jan Reedy




More information about the Python-list mailing list