Fred Drake | 6659c30 | 1998-03-03 22:02:19 +0000 | [diff] [blame] | 1 | \documentclass{manual} |
Guido van Rossum | 7a2dba2 | 1993-11-05 14:45:11 +0000 | [diff] [blame] | 2 | |
Guido van Rossum | d358afe | 1998-12-23 05:02:08 +0000 | [diff] [blame] | 3 | % XXX PM explain how to add new types to Python |
Guido van Rossum | 5049bcb | 1995-03-13 16:55:23 +0000 | [diff] [blame] | 4 | |
Guido van Rossum | 6938f06 | 1994-08-01 12:22:53 +0000 | [diff] [blame] | 5 | \title{Extending and Embedding the Python Interpreter} |
Guido van Rossum | 7a2dba2 | 1993-11-05 14:45:11 +0000 | [diff] [blame] | 6 | |
Guido van Rossum | 16cd7f9 | 1994-10-06 10:29:26 +0000 | [diff] [blame] | 7 | \input{boilerplate} |
Guido van Rossum | 83eb962 | 1993-11-23 16:28:45 +0000 | [diff] [blame] | 8 | |
Guido van Rossum | 7a2dba2 | 1993-11-05 14:45:11 +0000 | [diff] [blame] | 9 | % Tell \index to actually write the .idx file |
| 10 | \makeindex |
| 11 | |
| 12 | \begin{document} |
| 13 | |
Guido van Rossum | 7a2dba2 | 1993-11-05 14:45:11 +0000 | [diff] [blame] | 14 | \maketitle |
| 15 | |
Fred Drake | 9f86b66 | 1998-07-28 21:55:19 +0000 | [diff] [blame] | 16 | \ifhtml |
| 17 | \chapter*{Front Matter\label{front}} |
| 18 | \fi |
| 19 | |
Guido van Rossum | 16cd7f9 | 1994-10-06 10:29:26 +0000 | [diff] [blame] | 20 | \input{copyright} |
| 21 | |
Fred Drake | 33698f8 | 1999-02-16 23:06:32 +0000 | [diff] [blame] | 22 | |
Guido van Rossum | 7a2dba2 | 1993-11-05 14:45:11 +0000 | [diff] [blame] | 23 | \begin{abstract} |
| 24 | |
| 25 | \noindent |
Guido van Rossum | b92112d | 1995-03-20 14:24:09 +0000 | [diff] [blame] | 26 | Python is an interpreted, object-oriented programming language. This |
Fred Drake | ec9fbe9 | 1999-02-15 16:20:25 +0000 | [diff] [blame] | 27 | document describes how to write modules in C or \Cpp{} to extend the |
Guido van Rossum | b92112d | 1995-03-20 14:24:09 +0000 | [diff] [blame] | 28 | Python interpreter with new modules. Those modules can define new |
| 29 | functions but also new object types and their methods. The document |
| 30 | also describes how to embed the Python interpreter in another |
| 31 | application, for use as an extension language. Finally, it shows how |
| 32 | to compile and link extension modules so that they can be loaded |
| 33 | dynamically (at run time) into the interpreter, if the underlying |
| 34 | operating system supports this feature. |
| 35 | |
| 36 | This document assumes basic knowledge about Python. For an informal |
Fred Drake | 9fa76f1 | 1999-11-10 16:01:43 +0000 | [diff] [blame] | 37 | introduction to the language, see the |
| 38 | \citetitle[../tut/tut.html]{Python Tutorial}. The |
| 39 | \citetitle[../ref/ref.html]{Python Reference Manual} gives a more |
| 40 | formal definition of the language. The |
| 41 | \citetitle[../lib/lib.html]{Python Library Reference} documents the |
| 42 | existing object types, functions and modules (both built-in and |
| 43 | written in Python) that give the language its wide application range. |
Guido van Rossum | 7a2dba2 | 1993-11-05 14:45:11 +0000 | [diff] [blame] | 44 | |
Fred Drake | ec9fbe9 | 1999-02-15 16:20:25 +0000 | [diff] [blame] | 45 | For a detailed description of the whole Python/C API, see the separate |
Fred Drake | 9fa76f1 | 1999-11-10 16:01:43 +0000 | [diff] [blame] | 46 | \citetitle[../api/api.html]{Python/C API Reference Manual}. |
Guido van Rossum | fdacc58 | 1997-10-07 14:40:16 +0000 | [diff] [blame] | 47 | |
Guido van Rossum | 7a2dba2 | 1993-11-05 14:45:11 +0000 | [diff] [blame] | 48 | \end{abstract} |
| 49 | |
Fred Drake | 4d4f9e7 | 1998-01-13 22:25:02 +0000 | [diff] [blame] | 50 | \tableofcontents |
Guido van Rossum | 7a2dba2 | 1993-11-05 14:45:11 +0000 | [diff] [blame] | 51 | |
Guido van Rossum | db65a6c | 1993-11-05 17:11:16 +0000 | [diff] [blame] | 52 | |
Fred Drake | cc8f44b | 2001-08-20 19:30:29 +0000 | [diff] [blame] | 53 | \input{extending} |
| 54 | \input{newtypes} |
Martin v. Löwis | 27761f3 | 2002-03-09 10:06:14 +0000 | [diff] [blame] | 55 | \input{building} |
Fred Drake | cc8f44b | 2001-08-20 19:30:29 +0000 | [diff] [blame] | 56 | \input{windows} |
| 57 | \input{embedding} |
Fred Drake | 1c25803 | 2000-09-08 22:54:53 +0000 | [diff] [blame] | 58 | |
Fred Drake | ed773ef | 2000-09-21 21:35:22 +0000 | [diff] [blame] | 59 | |
| 60 | \appendix |
| 61 | \chapter{Reporting Bugs} |
| 62 | \input{reportingbugs} |
| 63 | |
Fred Drake | d5df09c | 2001-06-20 21:37:34 +0000 | [diff] [blame] | 64 | \chapter{History and License} |
| 65 | \input{license} |
| 66 | |
Guido van Rossum | 7a2dba2 | 1993-11-05 14:45:11 +0000 | [diff] [blame] | 67 | \end{document} |