| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| 2 | <html> |
| 3 | <head> |
| 4 | <link rel="STYLESHEET" href="ext.css" type='text/css' /> |
| 5 | <link rel="SHORTCUT ICON" href="../icons/pyfav.png" type="image/png" /> |
| 6 | <link rel='start' href='../index.html' title='Python Documentation Index' /> |
| 7 | <link rel="first" href="ext.html" title='Extending and Embedding the Python Interpreter' /> |
| 8 | <link rel='contents' href='contents.html' title="Contents" /> |
| 9 | <link rel='last' href='about.html' title='About this document...' /> |
| 10 | <link rel='help' href='about.html' title='About this document...' /> |
| 11 | <link rel="next" href="contents.html" /> |
| 12 | <link rel="prev" href="ext.html" /> |
| 13 | <link rel="parent" href="ext.html" /> |
| 14 | <link rel="next" href="contents.html" /> |
| 15 | <meta name='aesop' content='information' /> |
| 16 | <title>Front Matter</title> |
| 17 | </head> |
| 18 | <body> |
| 19 | <DIV CLASS="navigation"> |
| 20 | <div id='top-navigation-panel' xml:id='top-navigation-panel'> |
| 21 | <table align="center" width="100%" cellpadding="0" cellspacing="2"> |
| 22 | <tr> |
| 23 | <td class='online-navigation'><a rel="prev" title="Extending and Embedding the" |
| 24 | href="ext.html"><img src='../icons/previous.png' |
| 25 | border='0' height='32' alt='Previous Page' width='32' /></A></td> |
| 26 | <td class='online-navigation'><a rel="parent" title="Extending and Embedding the" |
| 27 | href="ext.html"><img src='../icons/up.png' |
| 28 | border='0' height='32' alt='Up One Level' width='32' /></A></td> |
| 29 | <td class='online-navigation'><a rel="next" title="Contents" |
| 30 | href="contents.html"><img src='../icons/next.png' |
| 31 | border='0' height='32' alt='Next Page' width='32' /></A></td> |
| 32 | <td align="center" width="100%">Extending and Embedding the Python Interpreter</td> |
| 33 | <td class='online-navigation'><a rel="contents" title="Table of Contents" |
| 34 | href="contents.html"><img src='../icons/contents.png' |
| 35 | border='0' height='32' alt='Contents' width='32' /></A></td> |
| 36 | <td class='online-navigation'><img src='../icons/blank.png' |
| 37 | border='0' height='32' alt='' width='32' /></td> |
| 38 | <td class='online-navigation'><img src='../icons/blank.png' |
| 39 | border='0' height='32' alt='' width='32' /></td> |
| 40 | </tr></table> |
| 41 | <div class='online-navigation'> |
| 42 | <b class="navlabel">Previous:</b> |
| 43 | <a class="sectref" rel="prev" href="ext.html">Extending and Embedding the</A> |
| 44 | <b class="navlabel">Up:</b> |
| 45 | <a class="sectref" rel="parent" href="ext.html">Extending and Embedding the</A> |
| 46 | <b class="navlabel">Next:</b> |
| 47 | <a class="sectref" rel="next" href="contents.html">Contents</A> |
| 48 | </div> |
| 49 | <hr /></div> |
| 50 | </DIV> |
| 51 | <!--End of Navigation Panel--> |
| 52 | |
| 53 | <H1><A NAME="SECTION001000000000000000000"></A><A NAME="front"></A> |
| 54 | <BR> |
| 55 | Front Matter |
| 56 | </H1> |
| 57 | |
| 58 | <P> |
| 59 | Copyright © 2001-2004 Python Software Foundation. |
| 60 | All rights reserved. |
| 61 | |
| 62 | <P> |
| 63 | Copyright © 2000 BeOpen.com. |
| 64 | All rights reserved. |
| 65 | |
| 66 | <P> |
| 67 | Copyright © 1995-2000 Corporation for National Research Initiatives. |
| 68 | All rights reserved. |
| 69 | |
| 70 | <P> |
| 71 | Copyright © 1991-1995 Stichting Mathematisch Centrum. |
| 72 | All rights reserved. |
| 73 | |
| 74 | <P> |
| 75 | See the end of this document for complete license and permissions |
| 76 | information. |
| 77 | |
| 78 | <P> |
| 79 | |
| 80 | <H3>Abstract:</H3> |
| 81 | <DIV CLASS="ABSTRACT"> |
| 82 | |
| 83 | <P> |
| 84 | Python is an interpreted, object-oriented programming language. This |
| 85 | document describes how to write modules in C or C++ to extend the |
| 86 | Python interpreter with new modules. Those modules can define new |
| 87 | functions but also new object types and their methods. The document |
| 88 | also describes how to embed the Python interpreter in another |
| 89 | application, for use as an extension language. Finally, it shows how |
| 90 | to compile and link extension modules so that they can be loaded |
| 91 | dynamically (at run time) into the interpreter, if the underlying |
| 92 | operating system supports this feature. |
| 93 | |
| 94 | <P> |
| 95 | This document assumes basic knowledge about Python. For an informal |
| 96 | introduction to the language, see the |
| 97 | <em class="citetitle"><a |
| 98 | href="../tut/tut.html" |
| 99 | title="Python Tutorial" |
| 100 | >Python Tutorial</a></em>. The |
| 101 | <em class="citetitle"><a |
| 102 | href="../ref/ref.html" |
| 103 | title="Python Reference Manual" |
| 104 | >Python Reference Manual</a></em> gives a more |
| 105 | formal definition of the language. The |
| 106 | <em class="citetitle"><a |
| 107 | href="../lib/lib.html" |
| 108 | title="Python Library Reference" |
| 109 | >Python Library Reference</a></em> documents the |
| 110 | existing object types, functions and modules (both built-in and |
| 111 | written in Python) that give the language its wide application range. |
| 112 | |
| 113 | <P> |
| 114 | For a detailed description of the whole Python/C API, see the separate |
| 115 | <em class="citetitle"><a |
| 116 | href="../api/api.html" |
| 117 | title="Python/C API Reference Manual" |
| 118 | >Python/C API Reference Manual</a></em>. |
| 119 | |
| 120 | <P> |
| 121 | </DIV> |
| 122 | <P> |
| 123 | |
| 124 | <P> |
| 125 | |
| 126 | <DIV CLASS="navigation"> |
| 127 | <div class='online-navigation'> |
| 128 | <p></p><hr /> |
| 129 | <table align="center" width="100%" cellpadding="0" cellspacing="2"> |
| 130 | <tr> |
| 131 | <td class='online-navigation'><a rel="prev" title="Extending and Embedding the" |
| 132 | href="ext.html"><img src='../icons/previous.png' |
| 133 | border='0' height='32' alt='Previous Page' width='32' /></A></td> |
| 134 | <td class='online-navigation'><a rel="parent" title="Extending and Embedding the" |
| 135 | href="ext.html"><img src='../icons/up.png' |
| 136 | border='0' height='32' alt='Up One Level' width='32' /></A></td> |
| 137 | <td class='online-navigation'><a rel="next" title="Contents" |
| 138 | href="contents.html"><img src='../icons/next.png' |
| 139 | border='0' height='32' alt='Next Page' width='32' /></A></td> |
| 140 | <td align="center" width="100%">Extending and Embedding the Python Interpreter</td> |
| 141 | <td class='online-navigation'><a rel="contents" title="Table of Contents" |
| 142 | href="contents.html"><img src='../icons/contents.png' |
| 143 | border='0' height='32' alt='Contents' width='32' /></A></td> |
| 144 | <td class='online-navigation'><img src='../icons/blank.png' |
| 145 | border='0' height='32' alt='' width='32' /></td> |
| 146 | <td class='online-navigation'><img src='../icons/blank.png' |
| 147 | border='0' height='32' alt='' width='32' /></td> |
| 148 | </tr></table> |
| 149 | <div class='online-navigation'> |
| 150 | <b class="navlabel">Previous:</b> |
| 151 | <a class="sectref" rel="prev" href="ext.html">Extending and Embedding the</A> |
| 152 | <b class="navlabel">Up:</b> |
| 153 | <a class="sectref" rel="parent" href="ext.html">Extending and Embedding the</A> |
| 154 | <b class="navlabel">Next:</b> |
| 155 | <a class="sectref" rel="next" href="contents.html">Contents</A> |
| 156 | </div> |
| 157 | </div> |
| 158 | <hr /> |
| 159 | <span class="release-info">Release 2.4.2, documentation updated on 28 September 2005.</span> |
| 160 | </DIV> |
| 161 | <!--End of Navigation Panel--> |
| 162 | <ADDRESS> |
| 163 | See <i><a href="about.html">About this document...</a></i> for information on suggesting changes. |
| 164 | </ADDRESS> |
| 165 | </BODY> |
| 166 | </HTML> |