Calling foreign functions from Python? ctypes?

Neil Hodgson nyamatongwe+thunder at
Fri Jan 6 19:55:45 EST 2006

Paul Watson:

> Neil Hodgson wrote:
>>    It is unlikely that ctypes will be included in the standard Python 
>> build as it allows unsafe memory access making it much easier to crash 
>> Python.
> Does extending Python with any C/C++ function not do the same thing?

    No. It is the responsibility of the extension author to ensure that 
there is no possibility of crashing Python. With ctypes, you have a 
generic mechanism that enables Python code to cause a crash.


More information about the Python-list mailing list