diff options
author | Brett Cannon <bcannon@gmail.com> | 2009-09-17 03:39:33 (GMT) |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2009-09-17 03:39:33 (GMT) |
commit | 7f98a6c0b6bb281343de388b5ad8b1bca2ca39b9 (patch) | |
tree | 944026be8e329c209b86a65501b90def721b9f47 /Doc/extending | |
parent | 2031d13172078a1b71e37459c2611baa85d8deb9 (diff) | |
download | cpython-7f98a6c0b6bb281343de388b5ad8b1bca2ca39b9.zip cpython-7f98a6c0b6bb281343de388b5ad8b1bca2ca39b9.tar.gz cpython-7f98a6c0b6bb281343de388b5ad8b1bca2ca39b9.tar.bz2 |
Merged revisions 74862 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r74862 | brett.cannon | 2009-09-16 20:24:45 -0700 (Wed, 16 Sep 2009) | 1 line
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 497180a..980d407 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: |