]> granicus.if.org Git - python/commitdiff
Note in the intro to Extending... that ctypes can be a simpler, more portable solutio...
authorBrett Cannon <bcannon@gmail.com>
Thu, 17 Sep 2009 03:24:45 +0000 (03:24 +0000)
committerBrett Cannon <bcannon@gmail.com>
Thu, 17 Sep 2009 03:24:45 +0000 (03:24 +0000)
Doc/extending/extending.rst

index 5c99c3db27ab345515659c12bed3d9e208b26cc0..6f7711739ccefdacc10feb3484cbf90ca723afac 100644 (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: