[Python-checkins] r74862 - python/trunk/Doc/extending/extending.rst
brett.cannon
python-checkins at python.org
Thu Sep 17 05:24:45 CEST 2009
Author: brett.cannon
Date: Thu Sep 17 05:24:45 2009
New Revision: 74862
Log:
Note in the intro to Extending... that ctypes can be a simpler, more portable solution than custom C code.
Modified:
python/trunk/Doc/extending/extending.rst
Modified: python/trunk/Doc/extending/extending.rst
==============================================================================
--- python/trunk/Doc/extending/extending.rst (original)
+++ python/trunk/Doc/extending/extending.rst Thu Sep 17 05:24:45 2009
@@ -20,6 +20,13 @@
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:
More information about the Python-checkins
mailing list