| Release: | 3.1 |
|---|---|
| Date: | April 09, 2012 |
This document describes how to write modules in C or C++ to extend the Pythoninterpreter with new modules. Those modules can define new functions but alsonew object types and their methods. The document also describes how to embedthe Python interpreter in another application, for use as an extension language.Finally, it shows how to compile and link extension modules so that they can beloaded dynamically (at run time) into the interpreter, if the underlyingoperating system supports this feature.
This document assumes basic knowledge about Python. For an informalintroduction to the language, seeThe Python Tutorial.The Python Language Referencegives a more formal definition of the language.The Python Standard Library documentsthe existing object types, functions and modules (both built-in and written inPython) that give the language its wide application range.
For a detailed description of the whole Python/C API, see the separatePython/C API Reference Manual.
1. Extending Python with C or C++
Enter search terms or a module, class or function name.