blob: 75cf4c5d316ae7040fcb49b66cceb2163e812f00 [file] [log] [blame]
Georg Brandl116aa622007-08-15 14:28:22 +00001.. _extending-index:
2
3##################################################
4 Extending and Embedding the Python Interpreter
5##################################################
6
Georg Brandl116aa622007-08-15 14:28:22 +00007This document describes how to write modules in C or C++ to extend the Python
8interpreter with new modules. Those modules can define new functions but also
9new object types and their methods. The document also describes how to embed
10the Python interpreter in another application, for use as an extension language.
11Finally, it shows how to compile and link extension modules so that they can be
12loaded dynamically (at run time) into the interpreter, if the underlying
13operating system supports this feature.
14
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
Benjamin Peterson5879d412009-03-30 14:51:56 +000026 :numbered:
Georg Brandl116aa622007-08-15 14:28:22 +000027
28 extending.rst
29 newtypes.rst
30 building.rst
31 windows.rst
32 embedding.rst