gooderp18绿色标准版
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

399 lines
25KB

  1. <!DOCTYPE html>
  2. <html lang="en" data-content_root="../">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
  6. <meta property="og:title" content="xml.sax.saxutils — SAX Utilities" />
  7. <meta property="og:type" content="website" />
  8. <meta property="og:url" content="https://docs.python.org/3/library/xml.sax.utils.html" />
  9. <meta property="og:site_name" content="Python documentation" />
  10. <meta property="og:description" content="Source code: Lib/xml/sax/saxutils.py The module xml.sax.saxutils contains a number of classes and functions that are commonly useful when creating SAX applications, either in direct use, or as base..." />
  11. <meta property="og:image" content="https://docs.python.org/3/_static/og-image.png" />
  12. <meta property="og:image:alt" content="Python documentation" />
  13. <meta name="description" content="Source code: Lib/xml/sax/saxutils.py The module xml.sax.saxutils contains a number of classes and functions that are commonly useful when creating SAX applications, either in direct use, or as base..." />
  14. <meta property="og:image:width" content="200" />
  15. <meta property="og:image:height" content="200" />
  16. <meta name="theme-color" content="#3776ab" />
  17. <title>xml.sax.saxutils — SAX Utilities &#8212; Python 3.12.3 documentation</title><meta name="viewport" content="width=device-width, initial-scale=1.0">
  18. <link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=80d5e7a1" />
  19. <link rel="stylesheet" type="text/css" href="../_static/pydoctheme.css?v=bb723527" />
  20. <link id="pygments_dark_css" media="(prefers-color-scheme: dark)" rel="stylesheet" type="text/css" href="../_static/pygments_dark.css?v=b20cc3f5" />
  21. <script src="../_static/documentation_options.js?v=2c828074"></script>
  22. <script src="../_static/doctools.js?v=888ff710"></script>
  23. <script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
  24. <script src="../_static/sidebar.js"></script>
  25. <link rel="search" type="application/opensearchdescription+xml"
  26. title="Search within Python 3.12.3 documentation"
  27. href="../_static/opensearch.xml"/>
  28. <link rel="author" title="About these documents" href="../about.html" />
  29. <link rel="index" title="Index" href="../genindex.html" />
  30. <link rel="search" title="Search" href="../search.html" />
  31. <link rel="copyright" title="Copyright" href="../copyright.html" />
  32. <link rel="next" title="xml.sax.xmlreader — Interface for XML parsers" href="xml.sax.reader.html" />
  33. <link rel="prev" title="xml.sax.handler — Base classes for SAX handlers" href="xml.sax.handler.html" />
  34. <link rel="canonical" href="https://docs.python.org/3/library/xml.sax.utils.html" />
  35. <style>
  36. @media only screen {
  37. table.full-width-table {
  38. width: 100%;
  39. }
  40. }
  41. </style>
  42. <link rel="stylesheet" href="../_static/pydoctheme_dark.css" media="(prefers-color-scheme: dark)" id="pydoctheme_dark_css">
  43. <link rel="shortcut icon" type="image/png" href="../_static/py.svg" />
  44. <script type="text/javascript" src="../_static/copybutton.js"></script>
  45. <script type="text/javascript" src="../_static/menu.js"></script>
  46. <script type="text/javascript" src="../_static/search-focus.js"></script>
  47. <script type="text/javascript" src="../_static/themetoggle.js"></script>
  48. </head>
  49. <body>
  50. <div class="mobile-nav">
  51. <input type="checkbox" id="menuToggler" class="toggler__input" aria-controls="navigation"
  52. aria-pressed="false" aria-expanded="false" role="button" aria-label="Menu" />
  53. <nav class="nav-content" role="navigation">
  54. <label for="menuToggler" class="toggler__label">
  55. <span></span>
  56. </label>
  57. <span class="nav-items-wrapper">
  58. <a href="https://www.python.org/" class="nav-logo">
  59. <img src="../_static/py.svg" alt="Python logo"/>
  60. </a>
  61. <span class="version_switcher_placeholder"></span>
  62. <form role="search" class="search" action="../search.html" method="get">
  63. <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" class="search-icon">
  64. <path fill-rule="nonzero" fill="currentColor" d="M15.5 14h-.79l-.28-.27a6.5 6.5 0 001.48-5.34c-.47-2.78-2.79-5-5.59-5.34a6.505 6.505 0 00-7.27 7.27c.34 2.8 2.56 5.12 5.34 5.59a6.5 6.5 0 005.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0 .41-.41.41-1.08 0-1.49L15.5 14zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path>
  65. </svg>
  66. <input placeholder="Quick search" aria-label="Quick search" type="search" name="q" />
  67. <input type="submit" value="Go"/>
  68. </form>
  69. </span>
  70. </nav>
  71. <div class="menu-wrapper">
  72. <nav class="menu" role="navigation" aria-label="main navigation">
  73. <div class="language_switcher_placeholder"></div>
  74. <label class="theme-selector-label">
  75. Theme
  76. <select class="theme-selector" oninput="activateTheme(this.value)">
  77. <option value="auto" selected>Auto</option>
  78. <option value="light">Light</option>
  79. <option value="dark">Dark</option>
  80. </select>
  81. </label>
  82. <div>
  83. <h4>Previous topic</h4>
  84. <p class="topless"><a href="xml.sax.handler.html"
  85. title="previous chapter"><code class="xref py py-mod docutils literal notranslate"><span class="pre">xml.sax.handler</span></code> — Base classes for SAX handlers</a></p>
  86. </div>
  87. <div>
  88. <h4>Next topic</h4>
  89. <p class="topless"><a href="xml.sax.reader.html"
  90. title="next chapter"><code class="xref py py-mod docutils literal notranslate"><span class="pre">xml.sax.xmlreader</span></code> — Interface for XML parsers</a></p>
  91. </div>
  92. <div role="note" aria-label="source link">
  93. <h3>This Page</h3>
  94. <ul class="this-page-menu">
  95. <li><a href="../bugs.html">Report a Bug</a></li>
  96. <li>
  97. <a href="https://github.com/python/cpython/blob/main/Doc/library/xml.sax.utils.rst"
  98. rel="nofollow">Show Source
  99. </a>
  100. </li>
  101. </ul>
  102. </div>
  103. </nav>
  104. </div>
  105. </div>
  106. <div class="related" role="navigation" aria-label="related navigation">
  107. <h3>Navigation</h3>
  108. <ul>
  109. <li class="right" style="margin-right: 10px">
  110. <a href="../genindex.html" title="General Index"
  111. accesskey="I">index</a></li>
  112. <li class="right" >
  113. <a href="../py-modindex.html" title="Python Module Index"
  114. >modules</a> |</li>
  115. <li class="right" >
  116. <a href="xml.sax.reader.html" title="xml.sax.xmlreader — Interface for XML parsers"
  117. accesskey="N">next</a> |</li>
  118. <li class="right" >
  119. <a href="xml.sax.handler.html" title="xml.sax.handler — Base classes for SAX handlers"
  120. accesskey="P">previous</a> |</li>
  121. <li><img src="../_static/py.svg" alt="Python logo" style="vertical-align: middle; margin-top: -1px"/></li>
  122. <li><a href="https://www.python.org/">Python</a> &#187;</li>
  123. <li class="switchers">
  124. <div class="language_switcher_placeholder"></div>
  125. <div class="version_switcher_placeholder"></div>
  126. </li>
  127. <li>
  128. </li>
  129. <li id="cpython-language-and-version">
  130. <a href="../index.html">3.12.3 Documentation</a> &#187;
  131. </li>
  132. <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> &#187;</li>
  133. <li class="nav-item nav-item-2"><a href="markup.html" accesskey="U">Structured Markup Processing Tools</a> &#187;</li>
  134. <li class="nav-item nav-item-this"><a href=""><code class="xref py py-mod docutils literal notranslate"><span class="pre">xml.sax.saxutils</span></code> — SAX Utilities</a></li>
  135. <li class="right">
  136. <div class="inline-search" role="search">
  137. <form class="inline-search" action="../search.html" method="get">
  138. <input placeholder="Quick search" aria-label="Quick search" type="search" name="q" id="search-box" />
  139. <input type="submit" value="Go" />
  140. </form>
  141. </div>
  142. |
  143. </li>
  144. <li class="right">
  145. <label class="theme-selector-label">
  146. Theme
  147. <select class="theme-selector" oninput="activateTheme(this.value)">
  148. <option value="auto" selected>Auto</option>
  149. <option value="light">Light</option>
  150. <option value="dark">Dark</option>
  151. </select>
  152. </label> |</li>
  153. </ul>
  154. </div>
  155. <div class="document">
  156. <div class="documentwrapper">
  157. <div class="bodywrapper">
  158. <div class="body" role="main">
  159. <section id="module-xml.sax.saxutils">
  160. <span id="xml-sax-saxutils-sax-utilities"></span><h1><a class="reference internal" href="#module-xml.sax.saxutils" title="xml.sax.saxutils: Convenience functions and classes for use with SAX."><code class="xref py py-mod docutils literal notranslate"><span class="pre">xml.sax.saxutils</span></code></a> — SAX Utilities<a class="headerlink" href="#module-xml.sax.saxutils" title="Link to this heading">¶</a></h1>
  161. <p><strong>Source code:</strong> <a class="reference external" href="https://github.com/python/cpython/tree/3.12/Lib/xml/sax/saxutils.py">Lib/xml/sax/saxutils.py</a></p>
  162. <hr class="docutils" />
  163. <p>The module <a class="reference internal" href="#module-xml.sax.saxutils" title="xml.sax.saxutils: Convenience functions and classes for use with SAX."><code class="xref py py-mod docutils literal notranslate"><span class="pre">xml.sax.saxutils</span></code></a> contains a number of classes and functions
  164. that are commonly useful when creating SAX applications, either in direct use,
  165. or as base classes.</p>
  166. <dl class="py function">
  167. <dt class="sig sig-object py" id="xml.sax.saxutils.escape">
  168. <span class="sig-prename descclassname"><span class="pre">xml.sax.saxutils.</span></span><span class="sig-name descname"><span class="pre">escape</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">entities</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">{}</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#xml.sax.saxutils.escape" title="Link to this definition">¶</a></dt>
  169. <dd><p>Escape <code class="docutils literal notranslate"><span class="pre">'&amp;'</span></code>, <code class="docutils literal notranslate"><span class="pre">'&lt;'</span></code>, and <code class="docutils literal notranslate"><span class="pre">'&gt;'</span></code> in a string of data.</p>
  170. <p>You can escape other strings of data by passing a dictionary as the optional
  171. <em>entities</em> parameter. The keys and values must all be strings; each key will be
  172. replaced with its corresponding value. The characters <code class="docutils literal notranslate"><span class="pre">'&amp;'</span></code>, <code class="docutils literal notranslate"><span class="pre">'&lt;'</span></code> and
  173. <code class="docutils literal notranslate"><span class="pre">'&gt;'</span></code> are always escaped, even if <em>entities</em> is provided.</p>
  174. <div class="admonition note">
  175. <p class="admonition-title">Note</p>
  176. <p>This function should only be used to escape characters that
  177. can’t be used directly in XML. Do not use this function as a general
  178. string translation function.</p>
  179. </div>
  180. </dd></dl>
  181. <dl class="py function">
  182. <dt class="sig sig-object py" id="xml.sax.saxutils.unescape">
  183. <span class="sig-prename descclassname"><span class="pre">xml.sax.saxutils.</span></span><span class="sig-name descname"><span class="pre">unescape</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">entities</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">{}</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#xml.sax.saxutils.unescape" title="Link to this definition">¶</a></dt>
  184. <dd><p>Unescape <code class="docutils literal notranslate"><span class="pre">'&amp;amp;'</span></code>, <code class="docutils literal notranslate"><span class="pre">'&amp;lt;'</span></code>, and <code class="docutils literal notranslate"><span class="pre">'&amp;gt;'</span></code> in a string of data.</p>
  185. <p>You can unescape other strings of data by passing a dictionary as the optional
  186. <em>entities</em> parameter. The keys and values must all be strings; each key will be
  187. replaced with its corresponding value. <code class="docutils literal notranslate"><span class="pre">'&amp;amp'</span></code>, <code class="docutils literal notranslate"><span class="pre">'&amp;lt;'</span></code>, and <code class="docutils literal notranslate"><span class="pre">'&amp;gt;'</span></code>
  188. are always unescaped, even if <em>entities</em> is provided.</p>
  189. </dd></dl>
  190. <dl class="py function">
  191. <dt class="sig sig-object py" id="xml.sax.saxutils.quoteattr">
  192. <span class="sig-prename descclassname"><span class="pre">xml.sax.saxutils.</span></span><span class="sig-name descname"><span class="pre">quoteattr</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">entities</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">{}</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#xml.sax.saxutils.quoteattr" title="Link to this definition">¶</a></dt>
  193. <dd><p>Similar to <a class="reference internal" href="#xml.sax.saxutils.escape" title="xml.sax.saxutils.escape"><code class="xref py py-func docutils literal notranslate"><span class="pre">escape()</span></code></a>, but also prepares <em>data</em> to be used as an
  194. attribute value. The return value is a quoted version of <em>data</em> with any
  195. additional required replacements. <a class="reference internal" href="#xml.sax.saxutils.quoteattr" title="xml.sax.saxutils.quoteattr"><code class="xref py py-func docutils literal notranslate"><span class="pre">quoteattr()</span></code></a> will select a quote
  196. character based on the content of <em>data</em>, attempting to avoid encoding any
  197. quote characters in the string. If both single- and double-quote characters
  198. are already in <em>data</em>, the double-quote characters will be encoded and <em>data</em>
  199. will be wrapped in double-quotes. The resulting string can be used directly
  200. as an attribute value:</p>
  201. <div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="nb">print</span><span class="p">(</span><span class="s2">&quot;&lt;element attr=</span><span class="si">%s</span><span class="s2">&gt;&quot;</span> <span class="o">%</span> <span class="n">quoteattr</span><span class="p">(</span><span class="s2">&quot;ab &#39; cd </span><span class="se">\&quot;</span><span class="s2"> ef&quot;</span><span class="p">))</span>
  202. <span class="go">&lt;element attr=&quot;ab &#39; cd &amp;quot; ef&quot;&gt;</span>
  203. </pre></div>
  204. </div>
  205. <p>This function is useful when generating attribute values for HTML or any SGML
  206. using the reference concrete syntax.</p>
  207. </dd></dl>
  208. <dl class="py class">
  209. <dt class="sig sig-object py" id="xml.sax.saxutils.XMLGenerator">
  210. <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">xml.sax.saxutils.</span></span><span class="sig-name descname"><span class="pre">XMLGenerator</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">out</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">encoding</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'iso-8859-1'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">short_empty_elements</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#xml.sax.saxutils.XMLGenerator" title="Link to this definition">¶</a></dt>
  211. <dd><p>This class implements the <a class="reference internal" href="xml.sax.handler.html#xml.sax.handler.ContentHandler" title="xml.sax.handler.ContentHandler"><code class="xref py py-class docutils literal notranslate"><span class="pre">ContentHandler</span></code></a> interface
  212. by writing SAX
  213. events back into an XML document. In other words, using an <a class="reference internal" href="#xml.sax.saxutils.XMLGenerator" title="xml.sax.saxutils.XMLGenerator"><code class="xref py py-class docutils literal notranslate"><span class="pre">XMLGenerator</span></code></a>
  214. as the content handler will reproduce the original document being parsed. <em>out</em>
  215. should be a file-like object which will default to <em>sys.stdout</em>. <em>encoding</em> is
  216. the encoding of the output stream which defaults to <code class="docutils literal notranslate"><span class="pre">'iso-8859-1'</span></code>.
  217. <em>short_empty_elements</em> controls the formatting of elements that contain no
  218. content: if <code class="docutils literal notranslate"><span class="pre">False</span></code> (the default) they are emitted as a pair of start/end
  219. tags, if set to <code class="docutils literal notranslate"><span class="pre">True</span></code> they are emitted as a single self-closed tag.</p>
  220. <div class="versionchanged">
  221. <p><span class="versionmodified changed">Changed in version 3.2: </span>Added the <em>short_empty_elements</em> parameter.</p>
  222. </div>
  223. </dd></dl>
  224. <dl class="py class">
  225. <dt class="sig sig-object py" id="xml.sax.saxutils.XMLFilterBase">
  226. <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">xml.sax.saxutils.</span></span><span class="sig-name descname"><span class="pre">XMLFilterBase</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">base</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#xml.sax.saxutils.XMLFilterBase" title="Link to this definition">¶</a></dt>
  227. <dd><p>This class is designed to sit between an
  228. <a class="reference internal" href="xml.sax.reader.html#xml.sax.xmlreader.XMLReader" title="xml.sax.xmlreader.XMLReader"><code class="xref py py-class docutils literal notranslate"><span class="pre">XMLReader</span></code></a> and the client
  229. application’s event handlers. By default, it does nothing but pass requests up
  230. to the reader and events on to the handlers unmodified, but subclasses can
  231. override specific methods to modify the event stream or the configuration
  232. requests as they pass through.</p>
  233. </dd></dl>
  234. <dl class="py function">
  235. <dt class="sig sig-object py" id="xml.sax.saxutils.prepare_input_source">
  236. <span class="sig-prename descclassname"><span class="pre">xml.sax.saxutils.</span></span><span class="sig-name descname"><span class="pre">prepare_input_source</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">source</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">base</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">''</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#xml.sax.saxutils.prepare_input_source" title="Link to this definition">¶</a></dt>
  237. <dd><p>This function takes an input source and an optional base URL and returns a
  238. fully resolved <a class="reference internal" href="xml.sax.reader.html#xml.sax.xmlreader.InputSource" title="xml.sax.xmlreader.InputSource"><code class="xref py py-class docutils literal notranslate"><span class="pre">InputSource</span></code></a> object ready for
  239. reading. The input source can be given as a string, a file-like object, or
  240. an <a class="reference internal" href="xml.sax.reader.html#xml.sax.xmlreader.InputSource" title="xml.sax.xmlreader.InputSource"><code class="xref py py-class docutils literal notranslate"><span class="pre">InputSource</span></code></a> object; parsers will use this
  241. function to implement the polymorphic <em>source</em> argument to their
  242. <a class="reference internal" href="xml.sax.reader.html#xml.sax.xmlreader.XMLReader.parse" title="xml.sax.xmlreader.XMLReader.parse"><code class="xref py py-meth docutils literal notranslate"><span class="pre">parse()</span></code></a> method.</p>
  243. </dd></dl>
  244. </section>
  245. <div class="clearer"></div>
  246. </div>
  247. </div>
  248. </div>
  249. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  250. <div class="sphinxsidebarwrapper">
  251. <div>
  252. <h4>Previous topic</h4>
  253. <p class="topless"><a href="xml.sax.handler.html"
  254. title="previous chapter"><code class="xref py py-mod docutils literal notranslate"><span class="pre">xml.sax.handler</span></code> — Base classes for SAX handlers</a></p>
  255. </div>
  256. <div>
  257. <h4>Next topic</h4>
  258. <p class="topless"><a href="xml.sax.reader.html"
  259. title="next chapter"><code class="xref py py-mod docutils literal notranslate"><span class="pre">xml.sax.xmlreader</span></code> — Interface for XML parsers</a></p>
  260. </div>
  261. <div role="note" aria-label="source link">
  262. <h3>This Page</h3>
  263. <ul class="this-page-menu">
  264. <li><a href="../bugs.html">Report a Bug</a></li>
  265. <li>
  266. <a href="https://github.com/python/cpython/blob/main/Doc/library/xml.sax.utils.rst"
  267. rel="nofollow">Show Source
  268. </a>
  269. </li>
  270. </ul>
  271. </div>
  272. </div>
  273. <div id="sidebarbutton" title="Collapse sidebar">
  274. <span>«</span>
  275. </div>
  276. </div>
  277. <div class="clearer"></div>
  278. </div>
  279. <div class="related" role="navigation" aria-label="related navigation">
  280. <h3>Navigation</h3>
  281. <ul>
  282. <li class="right" style="margin-right: 10px">
  283. <a href="../genindex.html" title="General Index"
  284. >index</a></li>
  285. <li class="right" >
  286. <a href="../py-modindex.html" title="Python Module Index"
  287. >modules</a> |</li>
  288. <li class="right" >
  289. <a href="xml.sax.reader.html" title="xml.sax.xmlreader — Interface for XML parsers"
  290. >next</a> |</li>
  291. <li class="right" >
  292. <a href="xml.sax.handler.html" title="xml.sax.handler — Base classes for SAX handlers"
  293. >previous</a> |</li>
  294. <li><img src="../_static/py.svg" alt="Python logo" style="vertical-align: middle; margin-top: -1px"/></li>
  295. <li><a href="https://www.python.org/">Python</a> &#187;</li>
  296. <li class="switchers">
  297. <div class="language_switcher_placeholder"></div>
  298. <div class="version_switcher_placeholder"></div>
  299. </li>
  300. <li>
  301. </li>
  302. <li id="cpython-language-and-version">
  303. <a href="../index.html">3.12.3 Documentation</a> &#187;
  304. </li>
  305. <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> &#187;</li>
  306. <li class="nav-item nav-item-2"><a href="markup.html" >Structured Markup Processing Tools</a> &#187;</li>
  307. <li class="nav-item nav-item-this"><a href=""><code class="xref py py-mod docutils literal notranslate"><span class="pre">xml.sax.saxutils</span></code> — SAX Utilities</a></li>
  308. <li class="right">
  309. <div class="inline-search" role="search">
  310. <form class="inline-search" action="../search.html" method="get">
  311. <input placeholder="Quick search" aria-label="Quick search" type="search" name="q" id="search-box" />
  312. <input type="submit" value="Go" />
  313. </form>
  314. </div>
  315. |
  316. </li>
  317. <li class="right">
  318. <label class="theme-selector-label">
  319. Theme
  320. <select class="theme-selector" oninput="activateTheme(this.value)">
  321. <option value="auto" selected>Auto</option>
  322. <option value="light">Light</option>
  323. <option value="dark">Dark</option>
  324. </select>
  325. </label> |</li>
  326. </ul>
  327. </div>
  328. <div class="footer">
  329. &copy;
  330. <a href="../copyright.html">
  331. Copyright
  332. </a>
  333. 2001-2024, Python Software Foundation.
  334. <br />
  335. This page is licensed under the Python Software Foundation License Version 2.
  336. <br />
  337. Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License.
  338. <br />
  339. See <a href="/license.html">History and License</a> for more information.<br />
  340. <br />
  341. The Python Software Foundation is a non-profit corporation.
  342. <a href="https://www.python.org/psf/donations/">Please donate.</a>
  343. <br />
  344. <br />
  345. Last updated on Apr 09, 2024 (13:47 UTC).
  346. <a href="/bugs.html">Found a bug</a>?
  347. <br />
  348. Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.2.6.
  349. </div>
  350. </body>
  351. </html>
上海开阖软件有限公司 沪ICP备12045867号-1