diff options
author | Brett Cannon <bcannon@gmail.com> | 2009-09-17 03:24:45 (GMT) |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2009-09-17 03:24:45 (GMT) |
commit | 2348eda37bf37abb6a96a69301f4a3303d353f33 (patch) | |
tree | ae6946ef70a228b4b0f685a4b1b837e5298accd9 /Doc/extending | |
parent | fd1fcffced95f254136ca9e715d210fe7c8dd5b1 (diff) | |
download | cpython-2348eda37bf37abb6a96a69301f4a3303d353f33.zip cpython-2348eda37bf37abb6a96a69301f4a3303d353f33.tar.gz cpython-2348eda37bf37abb6a96a69301f4a3303d353f33.tar.bz2 |
Note in the intro to Extending... that ctypes can be a simpler, more portable solution than custom C code.
Diffstat (limited to 'Doc/extending')
-rw-r--r-- | Doc/extending/extending.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/extending/extending.rst b/Doc/extending/extending.rst index 5c99c3d..6f77117 100644 --- a/Doc/extending/extending.rst +++ b/Doc/extending/extending.rst @@ -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: |