Note in the intro to Extending... that ctypes can be a simpler, more portable solution than custom C code.

This commit is contained in:
Brett Cannon 2009-09-17 03:24:45 +00:00
parent fd1fcffced
commit 2348eda37b
1 changed files with 7 additions and 0 deletions

View File

@ -20,6 +20,13 @@ source file by including the header ``"Python.h"``.
The compilation of an extension module depends on its intended use as well as on
your system setup; details are given in later chapters.
Do note that if your use case is calling C library functions or system calls,
you should consider using the :mod:`ctypes` module rather than writing custom
C code. Not only does :mod:`ctypes` let you write Python code to interface
with C code, but it is more portable between implementations of Python than
writing and compiling an extension module which typically ties you to CPython.
.. _extending-simpleexample: