blob: 61129439958522cef4d8393effb05098d7ac8a44 [file] [log] [blame]
Georg Brandl8ec7f652007-08-15 14:28:01 +00001.. _extending-index:
2
3##################################################
4 Extending and Embedding the Python Interpreter
5##################################################
6
Georg Brandl8ec7f652007-08-15 14:28:01 +00007This document describes how to write modules in C or C++ to extend the Python
Georg Brandl4bfc96b2013-10-06 18:36:34 +02008interpreter with new modules. Those modules can not only define new functions
9but also new object types and their methods. The document also describes how
10to embed the Python interpreter in another application, for use as an extension
11language. Finally, it shows how to compile and link extension modules so that
12they can be loaded dynamically (at run time) into the interpreter, if the
13underlying operating system supports this feature.
Georg Brandl8ec7f652007-08-15 14:28:01 +000014
15This document assumes basic knowledge about Python. For an informal
16introduction to the language, see :ref:`tutorial-index`. :ref:`reference-index`
17gives a more formal definition of the language. :ref:`library-index` documents
18the existing object types, functions and modules (both built-in and written in
19Python) that give the language its wide application range.
20
21For a detailed description of the whole Python/C API, see the separate
22:ref:`c-api-index`.
23
24.. toctree::
25 :maxdepth: 2
Georg Brandla0eea592009-03-28 19:57:36 +000026 :numbered:
Georg Brandl8ec7f652007-08-15 14:28:01 +000027
28 extending.rst
29 newtypes.rst
30 building.rst
31 windows.rst
32 embedding.rst