uTools-Manuals/docs/python/custominterp.html
2019-04-08 23:22:26 +08:00

1 line
2.0 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div class="body" role="main"><div class="section" id="custom-python-interpreters"><h1><span class="yiyi-st" id="yiyi-9">30. </span><span class="yiyi-st" id="yiyi-10">自定义Python解释器</span></h1><p><span class="yiyi-st" id="yiyi-11">本章中描述的模块允许编写类似于Python的交互式解释器的接口。</span><span class="yiyi-st" id="yiyi-12">如果你想要一个Python解释器支持除了Python语言之外的一些特殊功能你应该看看<a class="reference internal" href="code.html#module-code" title="code: Facilities to implement read-eval-print loops."><code class="xref py py-mod docutils literal"><span class="pre">code</span></code></a>模块。</span><span class="yiyi-st" id="yiyi-13"><a class="reference internal" href="codeop.html#module-codeop" title="codeop: Compile (possibly incomplete) Python code."><code class="xref py py-mod docutils literal"><span class="pre">codeop</span></code></a>模块是较低级的用于支持编译一个可能不完整的Python代码块。</span></p><p><span class="yiyi-st" id="yiyi-14">本章中描述的模块的完整列表是:</span></p><div class="toctree-wrapper compound"><ul><li class="toctree-l1"><span class="yiyi-st" id="yiyi-17"><a class="reference internal" href="code.html">30.1. <code class="docutils literal"><span class="pre">code</span></code> - 解释器基类</a></span><ul><li class="toctree-l2"><span class="yiyi-st" id="yiyi-15"><a class="reference internal" href="code.html#interactive-interpreter-objects">30.1.1.互动解释器对象</a></span></li><li class="toctree-l2"><span class="yiyi-st" id="yiyi-16"><a class="reference internal" href="code.html#interactive-console-objects">30.1.2.交互式控制台对象</a></span></li></ul></li><li class="toctree-l1"><span class="yiyi-st" id="yiyi-18"><a class="reference internal" href="codeop.html">30.2. <code class="docutils literal"><span class="pre">codeop</span></code> - 编译Python代码</a></span></li></ul></div></div></div>