mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-09 23:44:06 +08:00
1 line
2.0 KiB
HTML
1 line
2.0 KiB
HTML
<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> |