~dkuhlman/python-training-materials/Materials

« back to all changes in this revision

Viewing changes to python-3.5.1-docs-html/library/python.html

  • Committer: Dave Kuhlman
  • Date: 2017-04-15 16:24:56 UTC
  • Revision ID: dkuhlman@davekuhlman.org-20170415162456-iav9vozzg4iwqwv3
Updated docs

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
 
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
 
 
4
 
 
5
 
<html xmlns="http://www.w3.org/1999/xhtml">
6
 
  <head>
7
 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8
 
    
9
 
    <title>29. Python Runtime Services &mdash; Python 3.5.1 documentation</title>
10
 
    
11
 
    <link rel="stylesheet" href="../_static/pydoctheme.css" type="text/css" />
12
 
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
13
 
    
14
 
    <script type="text/javascript">
15
 
      var DOCUMENTATION_OPTIONS = {
16
 
        URL_ROOT:    '../',
17
 
        VERSION:     '3.5.1',
18
 
        COLLAPSE_INDEX: false,
19
 
        FILE_SUFFIX: '.html',
20
 
        HAS_SOURCE:  true
21
 
      };
22
 
    </script>
23
 
    <script type="text/javascript" src="../_static/jquery.js"></script>
24
 
    <script type="text/javascript" src="../_static/underscore.js"></script>
25
 
    <script type="text/javascript" src="../_static/doctools.js"></script>
26
 
    <script type="text/javascript" src="../_static/sidebar.js"></script>
27
 
    <link rel="search" type="application/opensearchdescription+xml"
28
 
          title="Search within Python 3.5.1 documentation"
29
 
          href="../_static/opensearch.xml"/>
30
 
    <link rel="author" title="About these documents" href="../about.html" />
31
 
    <link rel="copyright" title="Copyright" href="../copyright.html" />
32
 
    <link rel="top" title="Python 3.5.1 documentation" href="../contents.html" />
33
 
    <link rel="up" title="The Python Standard Library" href="index.html" />
34
 
    <link rel="next" title="29.1. sys — System-specific parameters and functions" href="sys.html" />
35
 
    <link rel="prev" title="28.4. zipapp — Manage executable python zip archives" href="zipapp.html" />
36
 
    <link rel="shortcut icon" type="image/png" href="../_static/py.png" />
37
 
    <script type="text/javascript" src="../_static/copybutton.js"></script>
38
 
    <script type="text/javascript" src="../_static/version_switch.js"></script>
39
 
    
40
 
 
41
 
 
42
 
  </head>
43
 
  <body role="document">  
44
 
    <div class="related" role="navigation" aria-label="related navigation">
45
 
      <h3>Navigation</h3>
46
 
      <ul>
47
 
        <li class="right" style="margin-right: 10px">
48
 
          <a href="../genindex.html" title="General Index"
49
 
             accesskey="I">index</a></li>
50
 
        <li class="right" >
51
 
          <a href="../py-modindex.html" title="Python Module Index"
52
 
             >modules</a> |</li>
53
 
        <li class="right" >
54
 
          <a href="sys.html" title="29.1. sys — System-specific parameters and functions"
55
 
             accesskey="N">next</a> |</li>
56
 
        <li class="right" >
57
 
          <a href="zipapp.html" title="28.4. zipapp — Manage executable python zip archives"
58
 
             accesskey="P">previous</a> |</li>
59
 
        <li><img src="../_static/py.png" alt=""
60
 
                 style="vertical-align: middle; margin-top: -1px"/></li>
61
 
        <li><a href="https://www.python.org/">Python</a> &raquo;</li>
62
 
        <li>
63
 
          <span class="version_switcher_placeholder">3.5.1</span>
64
 
          <a href="../index.html">Documentation </a> &raquo;
65
 
        </li>
66
 
 
67
 
          <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">The Python Standard Library</a> &raquo;</li> 
68
 
      </ul>
69
 
    </div>    
70
 
 
71
 
    <div class="document">
72
 
      <div class="documentwrapper">
73
 
        <div class="bodywrapper">
74
 
          <div class="body" role="main">
75
 
            
76
 
  <div class="section" id="python-runtime-services">
77
 
<span id="python"></span><h1>29. Python Runtime Services<a class="headerlink" href="#python-runtime-services" title="Permalink to this headline">¶</a></h1>
78
 
<p>The modules described in this chapter provide a wide range of services related
79
 
to the Python interpreter and its interaction with its environment.  Here&#8217;s an
80
 
overview:</p>
81
 
<div class="toctree-wrapper compound">
82
 
<ul>
83
 
<li class="toctree-l1"><a class="reference internal" href="sys.html">29.1. <code class="docutils literal"><span class="pre">sys</span></code> &#8212; System-specific parameters and functions</a></li>
84
 
<li class="toctree-l1"><a class="reference internal" href="sysconfig.html">29.2. <code class="docutils literal"><span class="pre">sysconfig</span></code> &#8212; Provide access to Python&#8217;s configuration information</a><ul>
85
 
<li class="toctree-l2"><a class="reference internal" href="sysconfig.html#configuration-variables">29.2.1. Configuration variables</a></li>
86
 
<li class="toctree-l2"><a class="reference internal" href="sysconfig.html#installation-paths">29.2.2. Installation paths</a></li>
87
 
<li class="toctree-l2"><a class="reference internal" href="sysconfig.html#other-functions">29.2.3. Other functions</a></li>
88
 
<li class="toctree-l2"><a class="reference internal" href="sysconfig.html#using-sysconfig-as-a-script">29.2.4. Using <code class="docutils literal"><span class="pre">sysconfig</span></code> as a script</a></li>
89
 
</ul>
90
 
</li>
91
 
<li class="toctree-l1"><a class="reference internal" href="builtins.html">29.3. <code class="docutils literal"><span class="pre">builtins</span></code> &#8212; Built-in objects</a></li>
92
 
<li class="toctree-l1"><a class="reference internal" href="__main__.html">29.4. <code class="docutils literal"><span class="pre">__main__</span></code> &#8212; Top-level script environment</a></li>
93
 
<li class="toctree-l1"><a class="reference internal" href="warnings.html">29.5. <code class="docutils literal"><span class="pre">warnings</span></code> &#8212; Warning control</a><ul>
94
 
<li class="toctree-l2"><a class="reference internal" href="warnings.html#warning-categories">29.5.1. Warning Categories</a></li>
95
 
<li class="toctree-l2"><a class="reference internal" href="warnings.html#the-warnings-filter">29.5.2. The Warnings Filter</a><ul>
96
 
<li class="toctree-l3"><a class="reference internal" href="warnings.html#default-warning-filters">29.5.2.1. Default Warning Filters</a></li>
97
 
</ul>
98
 
</li>
99
 
<li class="toctree-l2"><a class="reference internal" href="warnings.html#temporarily-suppressing-warnings">29.5.3. Temporarily Suppressing Warnings</a></li>
100
 
<li class="toctree-l2"><a class="reference internal" href="warnings.html#testing-warnings">29.5.4. Testing Warnings</a></li>
101
 
<li class="toctree-l2"><a class="reference internal" href="warnings.html#updating-code-for-new-versions-of-python">29.5.5. Updating Code For New Versions of Python</a></li>
102
 
<li class="toctree-l2"><a class="reference internal" href="warnings.html#available-functions">29.5.6. Available Functions</a></li>
103
 
<li class="toctree-l2"><a class="reference internal" href="warnings.html#available-context-managers">29.5.7. Available Context Managers</a></li>
104
 
</ul>
105
 
</li>
106
 
<li class="toctree-l1"><a class="reference internal" href="contextlib.html">29.6. <code class="docutils literal"><span class="pre">contextlib</span></code> &#8212; Utilities for <code class="docutils literal"><span class="pre">with</span></code>-statement contexts</a><ul>
107
 
<li class="toctree-l2"><a class="reference internal" href="contextlib.html#utilities">29.6.1. Utilities</a></li>
108
 
<li class="toctree-l2"><a class="reference internal" href="contextlib.html#examples-and-recipes">29.6.2. Examples and Recipes</a><ul>
109
 
<li class="toctree-l3"><a class="reference internal" href="contextlib.html#supporting-a-variable-number-of-context-managers">29.6.2.1. Supporting a variable number of context managers</a></li>
110
 
<li class="toctree-l3"><a class="reference internal" href="contextlib.html#simplifying-support-for-single-optional-context-managers">29.6.2.2. Simplifying support for single optional context managers</a></li>
111
 
<li class="toctree-l3"><a class="reference internal" href="contextlib.html#catching-exceptions-from-enter-methods">29.6.2.3. Catching exceptions from <code class="docutils literal"><span class="pre">__enter__</span></code> methods</a></li>
112
 
<li class="toctree-l3"><a class="reference internal" href="contextlib.html#cleaning-up-in-an-enter-implementation">29.6.2.4. Cleaning up in an <code class="docutils literal"><span class="pre">__enter__</span></code> implementation</a></li>
113
 
<li class="toctree-l3"><a class="reference internal" href="contextlib.html#replacing-any-use-of-try-finally-and-flag-variables">29.6.2.5. Replacing any use of <code class="docutils literal"><span class="pre">try-finally</span></code> and flag variables</a></li>
114
 
<li class="toctree-l3"><a class="reference internal" href="contextlib.html#using-a-context-manager-as-a-function-decorator">29.6.2.6. Using a context manager as a function decorator</a></li>
115
 
</ul>
116
 
</li>
117
 
<li class="toctree-l2"><a class="reference internal" href="contextlib.html#single-use-reusable-and-reentrant-context-managers">29.6.3. Single use, reusable and reentrant context managers</a><ul>
118
 
<li class="toctree-l3"><a class="reference internal" href="contextlib.html#reentrant-context-managers">29.6.3.1. Reentrant context managers</a></li>
119
 
<li class="toctree-l3"><a class="reference internal" href="contextlib.html#reusable-context-managers">29.6.3.2. Reusable context managers</a></li>
120
 
</ul>
121
 
</li>
122
 
</ul>
123
 
</li>
124
 
<li class="toctree-l1"><a class="reference internal" href="abc.html">29.7. <code class="docutils literal"><span class="pre">abc</span></code> &#8212; Abstract Base Classes</a></li>
125
 
<li class="toctree-l1"><a class="reference internal" href="atexit.html">29.8. <code class="docutils literal"><span class="pre">atexit</span></code> &#8212; Exit handlers</a><ul>
126
 
<li class="toctree-l2"><a class="reference internal" href="atexit.html#atexit-example">29.8.1. <code class="docutils literal"><span class="pre">atexit</span></code> Example</a></li>
127
 
</ul>
128
 
</li>
129
 
<li class="toctree-l1"><a class="reference internal" href="traceback.html">29.9. <code class="docutils literal"><span class="pre">traceback</span></code> &#8212; Print or retrieve a stack traceback</a><ul>
130
 
<li class="toctree-l2"><a class="reference internal" href="traceback.html#tracebackexception-objects">29.9.1. <code class="docutils literal"><span class="pre">TracebackException</span></code> Objects</a></li>
131
 
<li class="toctree-l2"><a class="reference internal" href="traceback.html#stacksummary-objects">29.9.2. <code class="docutils literal"><span class="pre">StackSummary</span></code> Objects</a></li>
132
 
<li class="toctree-l2"><a class="reference internal" href="traceback.html#framesummary-objects">29.9.3. <code class="docutils literal"><span class="pre">FrameSummary</span></code> Objects</a></li>
133
 
<li class="toctree-l2"><a class="reference internal" href="traceback.html#traceback-examples">29.9.4. Traceback Examples</a></li>
134
 
</ul>
135
 
</li>
136
 
<li class="toctree-l1"><a class="reference internal" href="__future__.html">29.10. <code class="docutils literal"><span class="pre">__future__</span></code> &#8212; Future statement definitions</a></li>
137
 
<li class="toctree-l1"><a class="reference internal" href="gc.html">29.11. <code class="docutils literal"><span class="pre">gc</span></code> &#8212; Garbage Collector interface</a></li>
138
 
<li class="toctree-l1"><a class="reference internal" href="inspect.html">29.12. <code class="docutils literal"><span class="pre">inspect</span></code> &#8212; Inspect live objects</a><ul>
139
 
<li class="toctree-l2"><a class="reference internal" href="inspect.html#types-and-members">29.12.1. Types and members</a></li>
140
 
<li class="toctree-l2"><a class="reference internal" href="inspect.html#retrieving-source-code">29.12.2. Retrieving source code</a></li>
141
 
<li class="toctree-l2"><a class="reference internal" href="inspect.html#introspecting-callables-with-the-signature-object">29.12.3. Introspecting callables with the Signature object</a></li>
142
 
<li class="toctree-l2"><a class="reference internal" href="inspect.html#classes-and-functions">29.12.4. Classes and functions</a></li>
143
 
<li class="toctree-l2"><a class="reference internal" href="inspect.html#the-interpreter-stack">29.12.5. The interpreter stack</a></li>
144
 
<li class="toctree-l2"><a class="reference internal" href="inspect.html#fetching-attributes-statically">29.12.6. Fetching attributes statically</a></li>
145
 
<li class="toctree-l2"><a class="reference internal" href="inspect.html#current-state-of-generators-and-coroutines">29.12.7. Current State of Generators and Coroutines</a></li>
146
 
<li class="toctree-l2"><a class="reference internal" href="inspect.html#command-line-interface">29.12.8. Command Line Interface</a></li>
147
 
</ul>
148
 
</li>
149
 
<li class="toctree-l1"><a class="reference internal" href="site.html">29.13. <code class="docutils literal"><span class="pre">site</span></code> &#8212; Site-specific configuration hook</a><ul>
150
 
<li class="toctree-l2"><a class="reference internal" href="site.html#readline-configuration">29.13.1. Readline configuration</a></li>
151
 
<li class="toctree-l2"><a class="reference internal" href="site.html#module-contents">29.13.2. Module contents</a></li>
152
 
</ul>
153
 
</li>
154
 
<li class="toctree-l1"><a class="reference internal" href="fpectl.html">29.14. <code class="docutils literal"><span class="pre">fpectl</span></code> &#8212; Floating point exception control</a><ul>
155
 
<li class="toctree-l2"><a class="reference internal" href="fpectl.html#example">29.14.1. Example</a></li>
156
 
<li class="toctree-l2"><a class="reference internal" href="fpectl.html#limitations-and-other-considerations">29.14.2. Limitations and other considerations</a></li>
157
 
</ul>
158
 
</li>
159
 
</ul>
160
 
</div>
161
 
</div>
162
 
 
163
 
 
164
 
          </div>
165
 
        </div>
166
 
      </div>
167
 
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
168
 
        <div class="sphinxsidebarwrapper">
169
 
  <h4>Previous topic</h4>
170
 
  <p class="topless"><a href="zipapp.html"
171
 
                        title="previous chapter">28.4. <code class="docutils literal"><span class="pre">zipapp</span></code> &#8212; Manage executable python zip archives</a></p>
172
 
  <h4>Next topic</h4>
173
 
  <p class="topless"><a href="sys.html"
174
 
                        title="next chapter">29.1. <code class="docutils literal"><span class="pre">sys</span></code> &#8212; System-specific parameters and functions</a></p>
175
 
<h3>This Page</h3>
176
 
<ul class="this-page-menu">
177
 
  <li><a href="../bugs.html">Report a Bug</a></li>
178
 
  <li><a href="../_sources/library/python.txt"
179
 
         rel="nofollow">Show Source</a></li>
180
 
</ul>
181
 
 
182
 
<div id="searchbox" style="display: none" role="search">
183
 
  <h3>Quick search</h3>
184
 
    <form class="search" action="../search.html" method="get">
185
 
      <input type="text" name="q" />
186
 
      <input type="submit" value="Go" />
187
 
      <input type="hidden" name="check_keywords" value="yes" />
188
 
      <input type="hidden" name="area" value="default" />
189
 
    </form>
190
 
    <p class="searchtip" style="font-size: 90%">
191
 
    Enter search terms or a module, class or function name.
192
 
    </p>
193
 
</div>
194
 
<script type="text/javascript">$('#searchbox').show(0);</script>
195
 
        </div>
196
 
      </div>
197
 
      <div class="clearer"></div>
198
 
    </div>  
199
 
    <div class="related" role="navigation" aria-label="related navigation">
200
 
      <h3>Navigation</h3>
201
 
      <ul>
202
 
        <li class="right" style="margin-right: 10px">
203
 
          <a href="../genindex.html" title="General Index"
204
 
             >index</a></li>
205
 
        <li class="right" >
206
 
          <a href="../py-modindex.html" title="Python Module Index"
207
 
             >modules</a> |</li>
208
 
        <li class="right" >
209
 
          <a href="sys.html" title="29.1. sys — System-specific parameters and functions"
210
 
             >next</a> |</li>
211
 
        <li class="right" >
212
 
          <a href="zipapp.html" title="28.4. zipapp — Manage executable python zip archives"
213
 
             >previous</a> |</li>
214
 
        <li><img src="../_static/py.png" alt=""
215
 
                 style="vertical-align: middle; margin-top: -1px"/></li>
216
 
        <li><a href="https://www.python.org/">Python</a> &raquo;</li>
217
 
        <li>
218
 
          <span class="version_switcher_placeholder">3.5.1</span>
219
 
          <a href="../index.html">Documentation </a> &raquo;
220
 
        </li>
221
 
 
222
 
          <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> &raquo;</li> 
223
 
      </ul>
224
 
    </div>  
225
 
    <div class="footer">
226
 
    &copy; <a href="../copyright.html">Copyright</a> 1990-2016, Python Software Foundation.
227
 
    <br />
228
 
    The Python Software Foundation is a non-profit corporation.
229
 
    <a href="https://www.python.org/psf/donations/">Please donate.</a>
230
 
    <br />
231
 
    Last updated on Jan 22, 2016.
232
 
    <a href="../bugs.html">Found a bug</a>?
233
 
    <br />
234
 
    Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.3.3.
235
 
    </div>
236
 
 
237
 
  </body>
238
 
</html>
 
 
b'\\ No newline at end of file'