1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
<html xmlns="http://www.w3.org/1999/xhtml">
7
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9
<title>32. Python Language Services — Python 3.5.2 documentation</title>
11
<link rel="stylesheet" href="../_static/pydoctheme.css" type="text/css" />
12
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
14
<script type="text/javascript">
15
var DOCUMENTATION_OPTIONS = {
18
COLLAPSE_INDEX: false,
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.2 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.2 documentation" href="../contents.html" />
33
<link rel="up" title="The Python Standard Library" href="index.html" />
34
<link rel="next" title="32.1. parser — Access Python parse trees" href="parser.html" />
35
<link rel="prev" title="31.5. importlib – The implementation of import" href="importlib.html" />
36
<link rel="shortcut icon" type="image/png" href="../_static/py.png" />
38
<script type="text/javascript" src="../_static/copybutton.js"></script>
39
<script type="text/javascript" src="../_static/version_switch.js"></script>
45
<body role="document">
46
<div class="related" role="navigation" aria-label="related navigation">
49
<li class="right" style="margin-right: 10px">
50
<a href="../genindex.html" title="General Index"
51
accesskey="I">index</a></li>
53
<a href="../py-modindex.html" title="Python Module Index"
56
<a href="parser.html" title="32.1. parser — Access Python parse trees"
57
accesskey="N">next</a> |</li>
59
<a href="importlib.html" title="31.5. importlib – The implementation of import"
60
accesskey="P">previous</a> |</li>
61
<li><img src="../_static/py.png" alt=""
62
style="vertical-align: middle; margin-top: -1px"/></li>
63
<li><a href="https://www.python.org/">Python</a> »</li>
65
<span class="version_switcher_placeholder">3.5.2</span>
66
<a href="../index.html">Documentation </a> »
69
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">The Python Standard Library</a> »</li>
73
<div class="inline-search" style="display: none" role="search">
74
<form class="inline-search" action="../search.html" method="get">
75
<input placeholder="Quick search" type="text" name="q" />
76
<input type="submit" value="Go" />
77
<input type="hidden" name="check_keywords" value="yes" />
78
<input type="hidden" name="area" value="default" />
81
<script type="text/javascript">$('.inline-search').show(0);</script>
88
<div class="document">
89
<div class="documentwrapper">
90
<div class="bodywrapper">
91
<div class="body" role="main">
93
<div class="section" id="python-language-services">
94
<span id="language"></span><h1>32. Python Language Services<a class="headerlink" href="#python-language-services" title="Permalink to this headline">¶</a></h1>
95
<p>Python provides a number of modules to assist in working with the Python
96
language. These modules support tokenizing, parsing, syntax analysis, bytecode
97
disassembly, and various other facilities.</p>
98
<p>These modules include:</p>
99
<div class="toctree-wrapper compound">
101
<li class="toctree-l1"><a class="reference internal" href="parser.html">32.1. <code class="docutils literal"><span class="pre">parser</span></code> — Access Python parse trees</a><ul>
102
<li class="toctree-l2"><a class="reference internal" href="parser.html#creating-st-objects">32.1.1. Creating ST Objects</a></li>
103
<li class="toctree-l2"><a class="reference internal" href="parser.html#converting-st-objects">32.1.2. Converting ST Objects</a></li>
104
<li class="toctree-l2"><a class="reference internal" href="parser.html#queries-on-st-objects">32.1.3. Queries on ST Objects</a></li>
105
<li class="toctree-l2"><a class="reference internal" href="parser.html#exceptions-and-error-handling">32.1.4. Exceptions and Error Handling</a></li>
106
<li class="toctree-l2"><a class="reference internal" href="parser.html#st-objects">32.1.5. ST Objects</a></li>
107
<li class="toctree-l2"><a class="reference internal" href="parser.html#example-emulation-of-compile">32.1.6. Example: Emulation of <code class="docutils literal"><span class="pre">compile()</span></code></a></li>
110
<li class="toctree-l1"><a class="reference internal" href="ast.html">32.2. <code class="docutils literal"><span class="pre">ast</span></code> — Abstract Syntax Trees</a><ul>
111
<li class="toctree-l2"><a class="reference internal" href="ast.html#node-classes">32.2.1. Node classes</a></li>
112
<li class="toctree-l2"><a class="reference internal" href="ast.html#abstract-grammar">32.2.2. Abstract Grammar</a></li>
113
<li class="toctree-l2"><a class="reference internal" href="ast.html#ast-helpers">32.2.3. <code class="docutils literal"><span class="pre">ast</span></code> Helpers</a></li>
116
<li class="toctree-l1"><a class="reference internal" href="symtable.html">32.3. <code class="docutils literal"><span class="pre">symtable</span></code> — Access to the compiler’s symbol tables</a><ul>
117
<li class="toctree-l2"><a class="reference internal" href="symtable.html#generating-symbol-tables">32.3.1. Generating Symbol Tables</a></li>
118
<li class="toctree-l2"><a class="reference internal" href="symtable.html#examining-symbol-tables">32.3.2. Examining Symbol Tables</a></li>
121
<li class="toctree-l1"><a class="reference internal" href="symbol.html">32.4. <code class="docutils literal"><span class="pre">symbol</span></code> — Constants used with Python parse trees</a></li>
122
<li class="toctree-l1"><a class="reference internal" href="token.html">32.5. <code class="docutils literal"><span class="pre">token</span></code> — Constants used with Python parse trees</a></li>
123
<li class="toctree-l1"><a class="reference internal" href="keyword.html">32.6. <code class="docutils literal"><span class="pre">keyword</span></code> — Testing for Python keywords</a></li>
124
<li class="toctree-l1"><a class="reference internal" href="tokenize.html">32.7. <code class="docutils literal"><span class="pre">tokenize</span></code> — Tokenizer for Python source</a><ul>
125
<li class="toctree-l2"><a class="reference internal" href="tokenize.html#tokenizing-input">32.7.1. Tokenizing Input</a></li>
126
<li class="toctree-l2"><a class="reference internal" href="tokenize.html#command-line-usage">32.7.2. Command-Line Usage</a></li>
127
<li class="toctree-l2"><a class="reference internal" href="tokenize.html#examples">32.7.3. Examples</a></li>
130
<li class="toctree-l1"><a class="reference internal" href="tabnanny.html">32.8. <code class="docutils literal"><span class="pre">tabnanny</span></code> — Detection of ambiguous indentation</a></li>
131
<li class="toctree-l1"><a class="reference internal" href="pyclbr.html">32.9. <code class="docutils literal"><span class="pre">pyclbr</span></code> — Python class browser support</a><ul>
132
<li class="toctree-l2"><a class="reference internal" href="pyclbr.html#class-objects">32.9.1. Class Objects</a></li>
133
<li class="toctree-l2"><a class="reference internal" href="pyclbr.html#function-objects">32.9.2. Function Objects</a></li>
136
<li class="toctree-l1"><a class="reference internal" href="py_compile.html">32.10. <code class="docutils literal"><span class="pre">py_compile</span></code> — Compile Python source files</a></li>
137
<li class="toctree-l1"><a class="reference internal" href="compileall.html">32.11. <code class="docutils literal"><span class="pre">compileall</span></code> — Byte-compile Python libraries</a><ul>
138
<li class="toctree-l2"><a class="reference internal" href="compileall.html#command-line-use">32.11.1. Command-line use</a></li>
139
<li class="toctree-l2"><a class="reference internal" href="compileall.html#public-functions">32.11.2. Public functions</a></li>
142
<li class="toctree-l1"><a class="reference internal" href="dis.html">32.12. <code class="docutils literal"><span class="pre">dis</span></code> — Disassembler for Python bytecode</a><ul>
143
<li class="toctree-l2"><a class="reference internal" href="dis.html#bytecode-analysis">32.12.1. Bytecode analysis</a></li>
144
<li class="toctree-l2"><a class="reference internal" href="dis.html#analysis-functions">32.12.2. Analysis functions</a></li>
145
<li class="toctree-l2"><a class="reference internal" href="dis.html#python-bytecode-instructions">32.12.3. Python Bytecode Instructions</a></li>
146
<li class="toctree-l2"><a class="reference internal" href="dis.html#opcode-collections">32.12.4. Opcode collections</a></li>
149
<li class="toctree-l1"><a class="reference internal" href="pickletools.html">32.13. <code class="docutils literal"><span class="pre">pickletools</span></code> — Tools for pickle developers</a><ul>
150
<li class="toctree-l2"><a class="reference internal" href="pickletools.html#command-line-usage">32.13.1. Command line usage</a><ul>
151
<li class="toctree-l3"><a class="reference internal" href="pickletools.html#command-line-options">32.13.1.1. Command line options</a></li>
154
<li class="toctree-l2"><a class="reference internal" href="pickletools.html#programmatic-interface">32.13.2. Programmatic Interface</a></li>
165
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
166
<div class="sphinxsidebarwrapper">
167
<h4>Previous topic</h4>
168
<p class="topless"><a href="importlib.html"
169
title="previous chapter">31.5. <code class="docutils literal"><span class="pre">importlib</span></code> – The implementation of <code class="docutils literal"><span class="pre">import</span></code></a></p>
171
<p class="topless"><a href="parser.html"
172
title="next chapter">32.1. <code class="docutils literal"><span class="pre">parser</span></code> — Access Python parse trees</a></p>
173
<div role="note" aria-label="source link">
175
<ul class="this-page-menu">
176
<li><a href="../bugs.html">Report a Bug</a></li>
177
<li><a href="../_sources/library/language.txt"
178
rel="nofollow">Show Source</a></li>
183
<div class="clearer"></div>
185
<div class="related" role="navigation" aria-label="related navigation">
188
<li class="right" style="margin-right: 10px">
189
<a href="../genindex.html" title="General Index"
192
<a href="../py-modindex.html" title="Python Module Index"
195
<a href="parser.html" title="32.1. parser — Access Python parse trees"
198
<a href="importlib.html" title="31.5. importlib – The implementation of import"
200
<li><img src="../_static/py.png" alt=""
201
style="vertical-align: middle; margin-top: -1px"/></li>
202
<li><a href="https://www.python.org/">Python</a> »</li>
204
<span class="version_switcher_placeholder">3.5.2</span>
205
<a href="../index.html">Documentation </a> »
208
<li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> »</li>
212
<div class="inline-search" style="display: none" role="search">
213
<form class="inline-search" action="../search.html" method="get">
214
<input placeholder="Quick search" type="text" name="q" />
215
<input type="submit" value="Go" />
216
<input type="hidden" name="check_keywords" value="yes" />
217
<input type="hidden" name="area" value="default" />
220
<script type="text/javascript">$('.inline-search').show(0);</script>
227
© <a href="../copyright.html">Copyright</a> 2001-2016, Python Software Foundation.
229
The Python Software Foundation is a non-profit corporation.
230
<a href="https://www.python.org/psf/donations/">Please donate.</a>
232
Last updated on Nov 21, 2016.
233
<a href="../bugs.html">Found a bug</a>?
235
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.3.3.
b'\\ No newline at end of file'