| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| 2 | <html> |
| 3 | <head> |
| 4 | <link rel="STYLESHEET" href="lib.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="lib.html" title='Python Library Reference' /> |
| 8 | <link rel='contents' href='contents.html' title="Contents" /> |
| 9 | <link rel='index' href='genindex.html' title='Index' /> |
| 10 | <link rel='last' href='about.html' title='About this document...' /> |
| 11 | <link rel='help' href='about.html' title='About this document...' /> |
| 12 | <link rel="next" href="strings.html" /> |
| 13 | <link rel="prev" href="builtin.html" /> |
| 14 | <link rel="parent" href="lib.html" /> |
| 15 | <link rel="next" href="module-sys.html" /> |
| 16 | <meta name='aesop' content='information' /> |
| 17 | <title>3. Python Runtime Services </title> |
| 18 | </head> |
| 19 | <body> |
| 20 | <DIV CLASS="navigation"> |
| 21 | <div id='top-navigation-panel' xml:id='top-navigation-panel'> |
| 22 | <table align="center" width="100%" cellpadding="0" cellspacing="2"> |
| 23 | <tr> |
| 24 | <td class='online-navigation'><a rel="prev" title="2.5 Built-in Constants" |
| 25 | href="node35.html"><img src='../icons/previous.png' |
| 26 | border='0' height='32' alt='Previous Page' width='32' /></A></td> |
| 27 | <td class='online-navigation'><a rel="parent" title="Python Library Reference" |
| 28 | href="lib.html"><img src='../icons/up.png' |
| 29 | border='0' height='32' alt='Up One Level' width='32' /></A></td> |
| 30 | <td class='online-navigation'><a rel="next" title="3.1 sys " |
| 31 | href="module-sys.html"><img src='../icons/next.png' |
| 32 | border='0' height='32' alt='Next Page' width='32' /></A></td> |
| 33 | <td align="center" width="100%">Python Library Reference</td> |
| 34 | <td class='online-navigation'><a rel="contents" title="Table of Contents" |
| 35 | href="contents.html"><img src='../icons/contents.png' |
| 36 | border='0' height='32' alt='Contents' width='32' /></A></td> |
| 37 | <td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png' |
| 38 | border='0' height='32' alt='Module Index' width='32' /></a></td> |
| 39 | <td class='online-navigation'><a rel="index" title="Index" |
| 40 | href="genindex.html"><img src='../icons/index.png' |
| 41 | border='0' height='32' alt='Index' width='32' /></A></td> |
| 42 | </tr></table> |
| 43 | <div class='online-navigation'> |
| 44 | <b class="navlabel">Previous:</b> |
| 45 | <a class="sectref" rel="prev" href="node35.html">2.5 Built-in Constants</A> |
| 46 | <b class="navlabel">Up:</b> |
| 47 | <a class="sectref" rel="parent" href="lib.html">Python Library Reference</A> |
| 48 | <b class="navlabel">Next:</b> |
| 49 | <a class="sectref" rel="next" href="module-sys.html">3.1 sys </A> |
| 50 | </div> |
| 51 | <hr /></div> |
| 52 | </DIV> |
| 53 | <!--End of Navigation Panel--> |
| 54 | |
| 55 | <H1><A NAME="SECTION005000000000000000000"></A><A NAME="python"></A> |
| 56 | <BR> |
| 57 | 3. Python Runtime Services |
| 58 | |
| 59 | </H1> |
| 60 | |
| 61 | <P> |
| 62 | The modules described in this chapter provide a wide range of services |
| 63 | related to the Python interpreter and its interaction with its |
| 64 | environment. Here's an overview: |
| 65 | |
| 66 | <P> |
| 67 | <table class='synopsistable' valign='baseline'> |
| 68 | <tr class='oddrow'> |
| 69 | <td><b><tt class='module'><a href='module-sys.html'>sys</a></tt></b></td> |
| 70 | <td> </td> |
| 71 | <td class='synopsis'>Access system-specific parameters and functions.</td></tr> |
| 72 | <tr><td><b><tt class='module'><a href='module-gc.html'>gc</a></tt></b></td> |
| 73 | <td> </td> |
| 74 | <td class='synopsis'>Interface to the cycle-detecting garbage collector.</td></tr> |
| 75 | <tr class='oddrow'> |
| 76 | <td><b><tt class='module'><a href='module-weakref.html'>weakref</a></tt></b></td> |
| 77 | <td> </td> |
| 78 | <td class='synopsis'>Support for weak references and weak dictionaries.</td></tr> |
| 79 | <tr><td><b><tt class='module'><a href='module-fpectl.html'>fpectl</a></tt></b></td> |
| 80 | <td> </td> |
| 81 | <td class='synopsis'>Provide control for floating point exception handling.</td></tr> |
| 82 | <tr class='oddrow'> |
| 83 | <td><b><tt class='module'><a href='module-atexit.html'>atexit</a></tt></b></td> |
| 84 | <td> </td> |
| 85 | <td class='synopsis'>Register and execute cleanup functions.</td></tr> |
| 86 | <tr><td><b><tt class='module'><a href='module-types.html'>types</a></tt></b></td> |
| 87 | <td> </td> |
| 88 | <td class='synopsis'>Names for built-in types.</td></tr> |
| 89 | <tr class='oddrow'> |
| 90 | <td><b><tt class='module'><a href='module-UserDict.html'>UserDict</a></tt></b></td> |
| 91 | <td> </td> |
| 92 | <td class='synopsis'>Class wrapper for dictionary objects.</td></tr> |
| 93 | <tr><td><b><tt class='module'><a href='module-UserList.html'>UserList</a></tt></b></td> |
| 94 | <td> </td> |
| 95 | <td class='synopsis'>Class wrapper for list objects.</td></tr> |
| 96 | <tr class='oddrow'> |
| 97 | <td><b><tt class='module'><a href='module-UserString.html'>UserString</a></tt></b></td> |
| 98 | <td> </td> |
| 99 | <td class='synopsis'>Class wrapper for string objects.</td></tr> |
| 100 | <tr><td><b><tt class='module'><a href='module-operator.html'>operator</a></tt></b></td> |
| 101 | <td> </td> |
| 102 | <td class='synopsis'>All Python's standard operators as built-in functions.</td></tr> |
| 103 | <tr class='oddrow'> |
| 104 | <td><b><tt class='module'><a href='module-inspect.html'>inspect</a></tt></b></td> |
| 105 | <td> </td> |
| 106 | <td class='synopsis'>Extract information and source code from live objects.</td></tr> |
| 107 | <tr><td><b><tt class='module'><a href='module-traceback.html'>traceback</a></tt></b></td> |
| 108 | <td> </td> |
| 109 | <td class='synopsis'>Print or retrieve a stack traceback.</td></tr> |
| 110 | <tr class='oddrow'> |
| 111 | <td><b><tt class='module'><a href='module-linecache.html'>linecache</a></tt></b></td> |
| 112 | <td> </td> |
| 113 | <td class='synopsis'>This module provides random access to individual lines |
| 114 | from text files.</td></tr> |
| 115 | <tr><td><b><tt class='module'><a href='module-pickle.html'>pickle</a></tt></b></td> |
| 116 | <td> </td> |
| 117 | <td class='synopsis'>Convert Python objects to streams of bytes and back.</td></tr> |
| 118 | <tr class='oddrow'> |
| 119 | <td><b><tt class='module'><a href='module-cPickle.html'>cPickle</a></tt></b></td> |
| 120 | <td> </td> |
| 121 | <td class='synopsis'>Faster version of <tt class="module"><a href="module-pickle.html">pickle</a></tt>, but not subclassable.</td></tr> |
| 122 | <tr><td><b><tt class='module'><a href='module-copyreg.html'>copy_reg</a></tt></b></td> |
| 123 | <td> </td> |
| 124 | <td class='synopsis'>Register <tt class="module">pickle</tt> support functions.</td></tr> |
| 125 | <tr class='oddrow'> |
| 126 | <td><b><tt class='module'><a href='module-shelve.html'>shelve</a></tt></b></td> |
| 127 | <td> </td> |
| 128 | <td class='synopsis'>Python object persistence.</td></tr> |
| 129 | <tr><td><b><tt class='module'><a href='module-copy.html'>copy</a></tt></b></td> |
| 130 | <td> </td> |
| 131 | <td class='synopsis'>Shallow and deep copy operations.</td></tr> |
| 132 | <tr class='oddrow'> |
| 133 | <td><b><tt class='module'><a href='module-marshal.html'>marshal</a></tt></b></td> |
| 134 | <td> </td> |
| 135 | <td class='synopsis'>Convert Python objects to streams of bytes and back |
| 136 | (with different constraints).</td></tr> |
| 137 | <tr><td><b><tt class='module'><a href='module-warnings.html'>warnings</a></tt></b></td> |
| 138 | <td> </td> |
| 139 | <td class='synopsis'>Issue warning messages and control their disposition.</td></tr> |
| 140 | <tr class='oddrow'> |
| 141 | <td><b><tt class='module'><a href='module-imp.html'>imp</a></tt></b></td> |
| 142 | <td> </td> |
| 143 | <td class='synopsis'>Access the implementation of the <tt class="keyword">import</tt> statement.</td></tr> |
| 144 | <tr><td><b><tt class='module'><a href='module-zipimport.html'>zipimport</a></tt></b></td> |
| 145 | <td> </td> |
| 146 | <td class='synopsis'>support for importing Python modules from ZIP archives.</td></tr> |
| 147 | <tr class='oddrow'> |
| 148 | <td><b><tt class='module'><a href='module-pkgutil.html'>pkgutil</a></tt></b></td> |
| 149 | <td> </td> |
| 150 | <td class='synopsis'>Utilities to support extension of packages.</td></tr> |
| 151 | <tr><td><b><tt class='module'><a href='module-modulefinder.html'>modulefinder</a></tt></b></td> |
| 152 | <td> </td> |
| 153 | <td class='synopsis'>Find modules used by a script.</td></tr> |
| 154 | <tr class='oddrow'> |
| 155 | <td><b><tt class='module'><a href='module-code.html'>code</a></tt></b></td> |
| 156 | <td> </td> |
| 157 | <td class='synopsis'>Base classes for interactive Python interpreters.</td></tr> |
| 158 | <tr><td><b><tt class='module'><a href='module-codeop.html'>codeop</a></tt></b></td> |
| 159 | <td> </td> |
| 160 | <td class='synopsis'>Compile (possibly incomplete) Python code.</td></tr> |
| 161 | <tr class='oddrow'> |
| 162 | <td><b><tt class='module'><a href='module-pprint.html'>pprint</a></tt></b></td> |
| 163 | <td> </td> |
| 164 | <td class='synopsis'>Data pretty printer.</td></tr> |
| 165 | <tr><td><b><tt class='module'><a href='module-repr.html'>repr</a></tt></b></td> |
| 166 | <td> </td> |
| 167 | <td class='synopsis'>Alternate <tt class="function">repr()</tt> implementation with size limits.</td></tr> |
| 168 | <tr class='oddrow'> |
| 169 | <td><b><tt class='module'><a href='module-new.html'>new</a></tt></b></td> |
| 170 | <td> </td> |
| 171 | <td class='synopsis'>Interface to the creation of runtime implementation objects.</td></tr> |
| 172 | <tr><td><b><tt class='module'><a href='module-site.html'>site</a></tt></b></td> |
| 173 | <td> </td> |
| 174 | <td class='synopsis'>A standard way to reference site-specific modules.</td></tr> |
| 175 | <tr class='oddrow'> |
| 176 | <td><b><tt class='module'><a href='module-user.html'>user</a></tt></b></td> |
| 177 | <td> </td> |
| 178 | <td class='synopsis'>A standard way to reference user-specific modules.</td></tr> |
| 179 | <tr><td><b><tt class='module'><a href='module-builtin.html'>__builtin__</a></tt></b></td> |
| 180 | <td> </td> |
| 181 | <td class='synopsis'>The module that provides the built-in namespace.</td></tr> |
| 182 | <tr class='oddrow'> |
| 183 | <td><b><tt class='module'><a href='module-main.html'>__main__</a></tt></b></td> |
| 184 | <td> </td> |
| 185 | <td class='synopsis'>The environment where the top-level script is run.</td></tr> |
| 186 | <tr><td><b><tt class='module'><a href='module-future.html'>__future__</a></tt></b></td> |
| 187 | <td> </td> |
| 188 | <td class='synopsis'>Future statement definitions</td></tr> |
| 189 | </table> |
| 190 | |
| 191 | <BR> |
| 192 | <DIV CLASS="navigation"> |
| 193 | <div class='online-navigation'> |
| 194 | <p></p><hr /> |
| 195 | <table align="center" width="100%" cellpadding="0" cellspacing="2"> |
| 196 | <tr> |
| 197 | <td class='online-navigation'><a rel="prev" title="2.5 Built-in Constants" |
| 198 | href="node35.html"><img src='../icons/previous.png' |
| 199 | border='0' height='32' alt='Previous Page' width='32' /></A></td> |
| 200 | <td class='online-navigation'><a rel="parent" title="Python Library Reference" |
| 201 | href="lib.html"><img src='../icons/up.png' |
| 202 | border='0' height='32' alt='Up One Level' width='32' /></A></td> |
| 203 | <td class='online-navigation'><a rel="next" title="3.1 sys " |
| 204 | href="module-sys.html"><img src='../icons/next.png' |
| 205 | border='0' height='32' alt='Next Page' width='32' /></A></td> |
| 206 | <td align="center" width="100%">Python Library Reference</td> |
| 207 | <td class='online-navigation'><a rel="contents" title="Table of Contents" |
| 208 | href="contents.html"><img src='../icons/contents.png' |
| 209 | border='0' height='32' alt='Contents' width='32' /></A></td> |
| 210 | <td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png' |
| 211 | border='0' height='32' alt='Module Index' width='32' /></a></td> |
| 212 | <td class='online-navigation'><a rel="index" title="Index" |
| 213 | href="genindex.html"><img src='../icons/index.png' |
| 214 | border='0' height='32' alt='Index' width='32' /></A></td> |
| 215 | </tr></table> |
| 216 | <div class='online-navigation'> |
| 217 | <b class="navlabel">Previous:</b> |
| 218 | <a class="sectref" rel="prev" href="node35.html">2.5 Built-in Constants</A> |
| 219 | <b class="navlabel">Up:</b> |
| 220 | <a class="sectref" rel="parent" href="lib.html">Python Library Reference</A> |
| 221 | <b class="navlabel">Next:</b> |
| 222 | <a class="sectref" rel="next" href="module-sys.html">3.1 sys </A> |
| 223 | </div> |
| 224 | </div> |
| 225 | <hr /> |
| 226 | <span class="release-info">Release 2.4.2, documentation updated on 28 September 2005.</span> |
| 227 | </DIV> |
| 228 | <!--End of Navigation Panel--> |
| 229 | <ADDRESS> |
| 230 | See <i><a href="about.html">About this document...</a></i> for information on suggesting changes. |
| 231 | </ADDRESS> |
| 232 | </BODY> |
| 233 | </HTML> |