id: 8340f28bd7304dd48de87be5756fdcea
parent_id: 
item_type: 1
item_id: 152471945fd64b45b081b138d834d9f5
item_updated_time: 1764345475565
title_diff: "[{\"diffs\":[[1,\"pdb — The Python Debugger — Python 3.7.3 docu\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":45}]"
body_diff: "[{\"diffs\":[[1,\"<html>\\\r\\\n<head>\\\r\\\n  <title>pdb — The Python Debugger — Python 3.7.3 documentation</title>\\\r\\\n  <basefont face=\\\"微软雅黑\\\" size=\\\"2\\\" />\\\r\\\n  <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html;charset=utf-8\\\" />\\\r\\\n  <meta name=\\\"exporter-version\\\" content=\\\"YXBJ Windows/608924 (zh-CN, DDL); Windows/10.0.0 (Win64); EDAMVersion=V2;\\\"/>\\\r\\\n  <style>\\\r\\\n\\tbody, td {\\\r\\\n\\t  font-family: 微软雅黑;\\\r\\\n\\t  font-size: 12pt;\\\r\\\n\\t}\\\r\\\n  </style>\\\r\\\n</head>\\\r\\\n<body>\\\r\\\n<a name=\\\"7330\\\"></a>\\\r\\\n<h1>pdb — The Python Debugger — Python 3.7.3 documentation</h1>\\\r\\\n\\\r\\\n<div><span>\\\n  <div>\\\n<div><br/></div><div style=\\\"font-size: 16px; display:block; min-width: 100%; position: relative;\\\"> <div><div style=\\\"background-color:white;\\\"><div><div><div><div><div>\\\n<span></span><span></span><h1 style=\\\"margin:0px;border:0px;padding:0.3em 0px;\\\"><a href=\\\"https://docs.python.org/3/library/pdb.html#module-pdb\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"pdb: The Python debugger for interactive interpreters.\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>pdb</span></code></a> — The Python Debugger<a href=\\\"https://docs.python.org/3/library/pdb.html#module-pdb\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this headline\\\">¶</a></h1>\\\n<p style=\\\"line-height:140%;\\\"><strong>Source code:</strong> <a href=\\\"https://github.com/python/cpython/tree/3.7/Lib/pdb.py\\\" style=\\\"color:rgb(0, 114, 170);\\\">Lib/pdb.py</a></p>\\\n<hr style=\\\"border:0px;background-color:rgb(204, 204, 204);height:1px;\\\"/>\\\n<p style=\\\"line-height:140%;\\\">The module <a href=\\\"https://docs.python.org/3/library/pdb.html#module-pdb\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"pdb: The Python debugger for interactive interpreters.\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>pdb</span></code></a> defines an interactive source code debugger for Python\\\nprograms.  It supports setting (conditional) breakpoints and single stepping at\\\nthe source line level, inspection of stack frames, source code listing, and\\\nevaluation of arbitrary Python code in the context of any stack frame.  It also\\\nsupports post-mortem debugging and can be called under program control.</p>\\\n<p style=\\\"line-height:140%;\\\">The debugger is extensible – it is actually defined as the class <a href=\\\"https://docs.python.org/3/library/pdb.html#pdb.Pdb\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"pdb.Pdb\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>Pdb</span></code></a>.\\\nThis is currently undocumented but easily understood by reading the source.  The\\\nextension interface uses the modules <a href=\\\"https://docs.python.org/3/library/bdb.html#module-bdb\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"bdb: Debugger framework.\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>bdb</span></code></a> and <a href=\\\"https://docs.python.org/3/library/cmd.html#module-cmd\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"cmd: Build line-oriented command interpreters.\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>cmd</span></code></a>.</p>\\\n<p style=\\\"line-height:140%;\\\">The debugger’s prompt is <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>(Pdb)</span></code>. Typical usage to run a program under control\\\nof the debugger is:</p>\\\n<div style=\\\"position:relative;\\\"><div style=\\\"background:none;\\\"><span style=\\\"cursor:pointer;position:absolute;top:0px;right:0px;border-color:rgb(170, 204, 153);border-style:solid;border-width:1px;color:rgb(170, 204, 153);font-family:monospace;padding-left:0.2em;padding-right:0.2em;border-radius:0px 3px 0px 0px;\\\" title=\\\"Hide the prompts and output\\\">&gt;&gt;&gt;</span><pre style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;border:1px solid rgb(170, 204, 153);\\\"><span></span><span style=\\\"color:rgb(198, 93, 9);font-weight:bold;\\\">&gt;&gt;&gt; </span><span style=\\\"color:rgb(0, 112, 32);font-weight:bold;\\\">import</span> <span style=\\\"color:rgb(14, 132, 181);font-weight:bold;\\\">pdb</span>\\\n<span style=\\\"color:rgb(198, 93, 9);font-weight:bold;\\\">&gt;&gt;&gt; </span><span style=\\\"color:rgb(0, 112, 32);font-weight:bold;\\\">import</span> <span style=\\\"color:rgb(14, 132, 181);font-weight:bold;\\\">mymodule</span>\\\n<span style=\\\"color:rgb(198, 93, 9);font-weight:bold;\\\">&gt;&gt;&gt; </span><span>pdb</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>run</span><span>(</span><span style=\\\"color:rgb(64, 112, 160);\\\">'mymodule.test()'</span><span>)</span>\\\n<span style=\\\"color:rgb(51, 51, 51);\\\">&gt; &lt;string&gt;(0)?()</span>\\\n<span style=\\\"color:rgb(51, 51, 51);\\\">(Pdb) continue</span>\\\n<span style=\\\"color:rgb(51, 51, 51);\\\">&gt; &lt;string&gt;(1)?()</span>\\\n<span style=\\\"color:rgb(51, 51, 51);\\\">(Pdb) continue</span>\\\n<span style=\\\"color:rgb(51, 51, 51);\\\">NameError: 'spam'</span>\\\n<span style=\\\"color:rgb(51, 51, 51);\\\">&gt; &lt;string&gt;(1)?()</span>\\\n<span style=\\\"color:rgb(51, 51, 51);\\\">(Pdb)</span>\\\n</pre></div>\\\n</div>\\\n<div>\\\n<p style=\\\"line-height:140%;\\\"><span>Changed in version 3.3: </span>Tab-completion via the <a href=\\\"https://docs.python.org/3/library/readline.html#module-readline\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"readline: GNU readline support for Python. (Unix)\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>readline</span></code></a> module is available for commands and\\\ncommand arguments, e.g. the current global and local names are offered as\\\narguments of the <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>p</span></code> command.</p>\\\n</div>\\\n<p style=\\\"line-height:140%;\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>pdb.py</span></code> can also be invoked as a script to debug other scripts.  For\\\nexample:</p>\\\n<div style=\\\"position:relative;\\\"><div style=\\\"background:none;\\\"><pre style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;border:1px solid rgb(170, 204, 153);\\\"><span></span><span>python3</span> <span style=\\\"color:rgb(102, 102, 102);\\\">-</span><span>m</span> <span>pdb</span> <span>myscript</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>py</span>\\\n</pre></div>\\\n</div>\\\n<p style=\\\"line-height:140%;\\\">When invoked as a script, pdb will automatically enter post-mortem debugging if\\\nthe program being debugged exits abnormally.  After post-mortem debugging (or\\\nafter normal exit of the program), pdb will restart the program.  Automatic\\\nrestarting preserves pdb’s state (such as breakpoints) and in most cases is more\\\nuseful than quitting the debugger upon program’s exit.</p>\\\n<div>\\\n<p style=\\\"line-height:140%;\\\"><span>New in version 3.2: </span><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>pdb.py</span></code> now accepts a <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>-c</span></code> option that executes commands as if given\\\nin a <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>.pdbrc</span></code> file, see <a href=\\\"https://docs.python.org/3/library/pdb.html#debugger-commands\\\" style=\\\"color:rgb(0, 114, 170);\\\"><span>Debugger Commands</span></a>.</p>\\\n</div>\\\n<div>\\\n<p style=\\\"line-height:140%;\\\"><span>New in version 3.7: </span><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>pdb.py</span></code> now accepts a <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>-m</span></code> option that execute modules similar to the way\\\n<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>python3</span> <span>-m</span></code> does. As with a script, the debugger will pause execution just\\\nbefore the first line of the module.</p>\\\n</div>\\\n<p style=\\\"line-height:140%;\\\">The typical usage to break into the debugger from a running program is to\\\ninsert</p>\\\n<div style=\\\"position:relative;\\\"><div style=\\\"background:none;\\\"><pre style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;border:1px solid rgb(170, 204, 153);\\\"><span></span><span style=\\\"color:rgb(0, 112, 32);font-weight:bold;\\\">import</span> <span style=\\\"color:rgb(14, 132, 181);font-weight:bold;\\\">pdb</span><span>;</span> <span>pdb</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>set_trace</span><span>()</span>\\\n</pre></div>\\\n</div>\\\n<p style=\\\"line-height:140%;\\\">at the location you want to break into the debugger.  You can then step through\\\nthe code following this statement, and continue running without the debugger\\\nusing the <a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-continue\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>continue</span></code></a> command.</p>\\\n<div>\\\n<p style=\\\"line-height:140%;\\\"><span>New in version 3.7: </span>The built-in <a href=\\\"https://docs.python.org/3/library/functions.html#breakpoint\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"breakpoint\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>breakpoint()</span></code></a>, when called with defaults, can be used\\\ninstead of <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>import</span> <span>pdb;</span> <span>pdb.set_trace()</span></code>.</p>\\\n</div>\\\n<p style=\\\"line-height:140%;\\\">The typical usage to inspect a crashed program is:</p>\\\n<div style=\\\"position:relative;\\\"><div style=\\\"background:none;\\\"><span style=\\\"cursor:pointer;position:absolute;top:0px;right:0px;border-color:rgb(170, 204, 153);border-style:solid;border-width:1px;color:rgb(170, 204, 153);font-family:monospace;padding-left:0.2em;padding-right:0.2em;border-radius:0px 3px 0px 0px;\\\" title=\\\"Hide the prompts and output\\\">&gt;&gt;&gt;</span><pre style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;border:1px solid rgb(170, 204, 153);\\\"><span></span><span style=\\\"color:rgb(198, 93, 9);font-weight:bold;\\\">&gt;&gt;&gt; </span><span style=\\\"color:rgb(0, 112, 32);font-weight:bold;\\\">import</span> <span style=\\\"color:rgb(14, 132, 181);font-weight:bold;\\\">pdb</span>\\\n<span style=\\\"color:rgb(198, 93, 9);font-weight:bold;\\\">&gt;&gt;&gt; </span><span style=\\\"color:rgb(0, 112, 32);font-weight:bold;\\\">import</span> <span style=\\\"color:rgb(14, 132, 181);font-weight:bold;\\\">mymodule</span>\\\n<span style=\\\"color:rgb(198, 93, 9);font-weight:bold;\\\">&gt;&gt;&gt; </span><span>mymodule</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>test</span><span>()</span>\\\n<span style=\\\"color:rgb(0, 68, 221);\\\">Traceback (most recent call last):</span><span>\\\n  File </span><span style=\\\"color:rgb(0, 112, 32);\\\">&quot;&lt;stdin&gt;&quot;</span><span>, line </span><span style=\\\"color:rgb(32, 128, 80);\\\">1</span><span>, in </span><span>&lt;module&gt;</span><span>\\\n  File </span><span style=\\\"color:rgb(0, 112, 32);\\\">&quot;./mymodule.py&quot;</span><span>, line </span><span style=\\\"color:rgb(32, 128, 80);\\\">4</span><span>, in </span><span>test</span>\\\n    <span>test2</span><span>()</span><span>\\\n  File </span><span style=\\\"color:rgb(0, 112, 32);\\\">&quot;./mymodule.py&quot;</span><span>, line </span><span style=\\\"color:rgb(32, 128, 80);\\\">3</span><span>, in </span><span>test2</span>\\\n    <span style=\\\"color:rgb(0, 112, 32);\\\">print</span><span>(</span><span>spam</span><span>)</span>\\\n<span style=\\\"color:rgb(255, 0, 0);\\\">NameError</span><span>: </span><span>spam</span>\\\n<span style=\\\"color:rgb(198, 93, 9);font-weight:bold;\\\">&gt;&gt;&gt; </span><span>pdb</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>pm</span><span>()</span>\\\n<span style=\\\"color:rgb(51, 51, 51);\\\">&gt; ./mymodule.py(3)test2()</span>\\\n<span style=\\\"color:rgb(51, 51, 51);\\\">-&gt; print(spam)</span>\\\n<span style=\\\"color:rgb(51, 51, 51);\\\">(Pdb)</span>\\\n</pre></div>\\\n</div>\\\n<p style=\\\"line-height:140%;\\\">The module defines the following functions; each enters the debugger in a\\\nslightly different way:</p>\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">pdb.</code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">run</code><span>(</span><em>statement</em>, <em>globals=None</em>, <em>locals=None</em><span>)</span><a href=\\\"https://docs.python.org/3/library/pdb.html#pdb.run\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Execute the <em>statement</em> (given as a string or a code object) under debugger\\\ncontrol.  The debugger prompt appears before any code is executed; you can\\\nset breakpoints and type <a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-continue\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>continue</span></code></a>, or you can step through the\\\nstatement using <a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-step\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>step</span></code></a> or <a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-next\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>next</span></code></a> (all these commands are\\\nexplained below).  The optional <em>globals</em> and <em>locals</em> arguments specify the\\\nenvironment in which the code is executed; by default the dictionary of the\\\nmodule <a href=\\\"https://docs.python.org/3/library/__main__.html#module-__main__\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"__main__: The environment where the top-level script is run.\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>__main__</span></code></a> is used.  (See the explanation of the built-in\\\n<a href=\\\"https://docs.python.org/3/library/functions.html#exec\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"exec\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>exec()</span></code></a> or <a href=\\\"https://docs.python.org/3/library/functions.html#eval\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"eval\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>eval()</span></code></a> functions.)</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">pdb.</code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">runeval</code><span>(</span><em>expression</em>, <em>globals=None</em>, <em>locals=None</em><span>)</span><a href=\\\"https://docs.python.org/3/library/pdb.html#pdb.runeval\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Evaluate the <em>expression</em> (given as a string or a code object) under debugger\\\ncontrol.  When <a href=\\\"https://docs.python.org/3/library/pdb.html#pdb.runeval\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"pdb.runeval\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>runeval()</span></code></a> returns, it returns the value of the\\\nexpression.  Otherwise this function is similar to <a href=\\\"https://docs.python.org/3/library/pdb.html#pdb.run\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"pdb.run\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>run()</span></code></a>.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">pdb.</code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">runcall</code><span>(</span><em>function</em>, <em>*args</em>, <em>**kwds</em><span>)</span><a href=\\\"https://docs.python.org/3/library/pdb.html#pdb.runcall\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Call the <em>function</em> (a function or method object, not a string) with the\\\ngiven arguments.  When <a href=\\\"https://docs.python.org/3/library/pdb.html#pdb.runcall\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"pdb.runcall\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>runcall()</span></code></a> returns, it returns whatever the\\\nfunction call returned.  The debugger prompt appears as soon as the function\\\nis entered.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">pdb.</code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">set_trace</code><span>(</span><em>*</em>, <em>header=None</em><span>)</span><a href=\\\"https://docs.python.org/3/library/pdb.html#pdb.set_trace\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Enter the debugger at the calling stack frame.  This is useful to hard-code\\\na breakpoint at a given point in a program, even if the code is not\\\notherwise being debugged (e.g. when an assertion fails).  If given,\\\n<em>header</em> is printed to the console just before debugging begins.</p>\\\n<div>\\\n<p style=\\\"line-height:140%;\\\"><span>Changed in version 3.7: </span>The keyword-only argument <em>header</em>.</p>\\\n</div>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">pdb.</code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">post_mortem</code><span>(</span><em>traceback=None</em><span>)</span><a href=\\\"https://docs.python.org/3/library/pdb.html#pdb.post_mortem\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Enter post-mortem debugging of the given <em>traceback</em> object.  If no\\\n<em>traceback</em> is given, it uses the one of the exception that is currently\\\nbeing handled (an exception must be being handled if the default is to be\\\nused).</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">pdb.</code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">pm</code><span>(</span><span>)</span><a href=\\\"https://docs.python.org/3/library/pdb.html#pdb.pm\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Enter post-mortem debugging of the traceback found in\\\n<a href=\\\"https://docs.python.org/3/library/sys.html#sys.last_traceback\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"sys.last_traceback\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>sys.last_traceback</span></code></a>.</p>\\\n</dd></dl>\\\n\\\n<p style=\\\"line-height:140%;\\\">The <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>run*</span></code> functions and <a href=\\\"https://docs.python.org/3/library/pdb.html#pdb.set_trace\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"pdb.set_trace\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>set_trace()</span></code></a> are aliases for instantiating the\\\n<a href=\\\"https://docs.python.org/3/library/pdb.html#pdb.Pdb\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"pdb.Pdb\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>Pdb</span></code></a> class and calling the method of the same name.  If you want to\\\naccess further features, you have to do this yourself:</p>\\\n<dl><dt>\\\n<em>class </em><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">pdb.</code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">Pdb</code><span>(</span><em>completekey='tab'</em>, <em>stdin=None</em>, <em>stdout=None</em>, <em>skip=None</em>, <em>nosigint=False</em>, <em>readrc=True</em><span>)</span><a href=\\\"https://docs.python.org/3/library/pdb.html#pdb.Pdb\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\"><a href=\\\"https://docs.python.org/3/library/pdb.html#pdb.Pdb\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"pdb.Pdb\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>Pdb</span></code></a> is the debugger class.</p>\\\n<p style=\\\"line-height:140%;\\\">The <em>completekey</em>, <em>stdin</em> and <em>stdout</em> arguments are passed to the\\\nunderlying <a href=\\\"https://docs.python.org/3/library/cmd.html#cmd.Cmd\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"cmd.Cmd\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>cmd.Cmd</span></code></a> class; see the description there.</p>\\\n<p style=\\\"line-height:140%;\\\">The <em>skip</em> argument, if given, must be an iterable of glob-style module name\\\npatterns.  The debugger will not step into frames that originate in a module\\\nthat matches one of these patterns. <a href=\\\"https://docs.python.org/3/library/pdb.html#id3\\\" style=\\\"color:rgb(0, 114, 170);\\\">1</a></p>\\\n<p style=\\\"line-height:140%;\\\">By default, Pdb sets a handler for the SIGINT signal (which is sent when the\\\nuser presses <kbd>Ctrl-C</kbd> on the console) when you give a <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>continue</span></code> command.\\\nThis allows you to break into the debugger again by pressing <kbd>Ctrl-C</kbd>.  If you\\\nwant Pdb not to touch the SIGINT handler, set <em>nosigint</em> to true.</p>\\\n<p style=\\\"line-height:140%;\\\">The <em>readrc</em> argument defaults to true and controls whether Pdb will load\\\n.pdbrc files from the filesystem.</p>\\\n<p style=\\\"line-height:140%;\\\">Example call to enable tracing with <em>skip</em>:</p>\\\n<div style=\\\"position:relative;\\\"><div style=\\\"background:none;\\\"><pre style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;border:1px solid rgb(170, 204, 153);\\\"><span></span><span style=\\\"color:rgb(0, 112, 32);font-weight:bold;\\\">import</span> <span style=\\\"color:rgb(14, 132, 181);font-weight:bold;\\\">pdb</span><span>;</span> <span>pdb</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>Pdb</span><span>(</span><span>skip</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span>[</span><span style=\\\"color:rgb(64, 112, 160);\\\">'django.*'</span><span>])</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>set_trace</span><span>()</span>\\\n</pre></div>\\\n</div>\\\n<div>\\\n<p style=\\\"line-height:140%;\\\"><span>New in version 3.1: </span>The <em>skip</em> argument.</p>\\\n</div>\\\n<div>\\\n<p style=\\\"line-height:140%;\\\"><span>New in version 3.2: </span>The <em>nosigint</em> argument.  Previously, a SIGINT handler was never set by\\\nPdb.</p>\\\n</div>\\\n<div>\\\n<p style=\\\"line-height:140%;\\\"><span>Changed in version 3.6: </span>The <em>readrc</em> argument.</p>\\\n</div>\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">run</code><span>(</span><em>statement</em>, <em>globals=None</em>, <em>locals=None</em><span>)</span><a href=\\\"https://docs.python.org/3/library/pdb.html#pdb.Pdb.run\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">runeval</code><span>(</span><em>expression</em>, <em>globals=None</em>, <em>locals=None</em><span>)</span><a href=\\\"https://docs.python.org/3/library/pdb.html#pdb.Pdb.runeval\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">runcall</code><span>(</span><em>function</em>, <em>*args</em>, <em>**kwds</em><span>)</span><a href=\\\"https://docs.python.org/3/library/pdb.html#pdb.Pdb.runcall\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">set_trace</code><span>(</span><span>)</span><a href=\\\"https://docs.python.org/3/library/pdb.html#pdb.Pdb.set_trace\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">See the documentation for the functions explained above.</p>\\\n</dd></dl>\\\n\\\n</dd></dl>\\\n\\\n<div>\\\n<span></span><h2 style=\\\"margin:0px;border:0px;padding:0.3em 0px;\\\">Debugger Commands<a href=\\\"https://docs.python.org/3/library/pdb.html#debugger-commands\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this headline\\\">¶</a></h2>\\\n<p style=\\\"line-height:140%;\\\">The commands recognized by the debugger are listed below.  Most commands can be\\\nabbreviated to one or two letters as indicated; e.g. <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>h(elp)</span></code> means that\\\neither <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>h</span></code> or <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>help</span></code> can be used to enter the help command (but not <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>he</span></code>\\\nor <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>hel</span></code>, nor <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>H</span></code> or <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>Help</span></code> or <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>HELP</span></code>).  Arguments to commands must be\\\nseparated by whitespace (spaces or tabs).  Optional arguments are enclosed in\\\nsquare brackets (<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>[]</span></code>) in the command syntax; the square brackets must not be\\\ntyped.  Alternatives in the command syntax are separated by a vertical bar\\\n(<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>|</span></code>).</p>\\\n<p style=\\\"line-height:140%;\\\">Entering a blank line repeats the last command entered.  Exception: if the last\\\ncommand was a <a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-list\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>list</span></code></a> command, the next 11 lines are listed.</p>\\\n<p style=\\\"line-height:140%;\\\">Commands that the debugger doesn’t recognize are assumed to be Python statements\\\nand are executed in the context of the program being debugged.  Python\\\nstatements can also be prefixed with an exclamation point (<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>!</span></code>).  This is a\\\npowerful way to inspect the program being debugged; it is even possible to\\\nchange a variable or call a function.  When an exception occurs in such a\\\nstatement, the exception name is printed but the debugger’s state is not\\\nchanged.</p>\\\n<p style=\\\"line-height:140%;\\\">The debugger supports <a href=\\\"https://docs.python.org/3/library/pdb.html#debugger-aliases\\\" style=\\\"color:rgb(0, 114, 170);\\\"><span>aliases</span></a>.  Aliases can have\\\nparameters which allows one a certain level of adaptability to the context under\\\nexamination.</p>\\\n<p style=\\\"line-height:140%;\\\">Multiple commands may be entered on a single line, separated by <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>;;</span></code>.  (A\\\nsingle <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>;</span></code> is not used as it is the separator for multiple commands in a line\\\nthat is passed to the Python parser.)  No intelligence is applied to separating\\\nthe commands; the input is split at the first <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>;;</span></code> pair, even if it is in the\\\nmiddle of a quoted string.</p>\\\n<p style=\\\"line-height:140%;\\\">If a file <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>.pdbrc</span></code> exists in the user’s home directory or in the current\\\ndirectory, it is read in and executed as if it had been typed at the debugger\\\nprompt.  This is particularly useful for aliases.  If both files exist, the one\\\nin the home directory is read first and aliases defined there can be overridden\\\nby the local file.</p>\\\n<div>\\\n<p style=\\\"line-height:140%;\\\"><span>Changed in version 3.2: </span><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>.pdbrc</span></code> can now contain commands that continue debugging, such as\\\n<a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-continue\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>continue</span></code></a> or <a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-next\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>next</span></code></a>.  Previously, these commands had no\\\neffect.</p>\\\n</div>\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">h(elp)</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"> [command]</code><a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-help\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Without argument, print the list of available commands.  With a <em>command</em> as\\\nargument, print help about that command.  <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>help</span> <span>pdb</span></code> displays the full\\\ndocumentation (the docstring of the <a href=\\\"https://docs.python.org/3/library/pdb.html#module-pdb\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"pdb: The Python debugger for interactive interpreters.\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>pdb</span></code></a> module).  Since the <em>command</em>\\\nargument must be an identifier, <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>help</span> <span>exec</span></code> must be entered to get help on\\\nthe <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>!</span></code> command.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">w(here)</code><a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-where\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Print a stack trace, with the most recent frame at the bottom.  An arrow\\\nindicates the current frame, which determines the context of most commands.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">d(own)</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"> [count]</code><a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-down\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Move the current frame <em>count</em> (default one) levels down in the stack trace\\\n(to a newer frame).</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">u(p)</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"> [count]</code><a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-up\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Move the current frame <em>count</em> (default one) levels up in the stack trace (to\\\nan older frame).</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">b(reak)</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"> [([filename:]lineno | function) [, condition]]</code><a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-break\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">With a <em>lineno</em> argument, set a break there in the current file.  With a\\\n<em>function</em> argument, set a break at the first executable statement within\\\nthat function.  The line number may be prefixed with a filename and a colon,\\\nto specify a breakpoint in another file (probably one that hasn’t been loaded\\\nyet).  The file is searched on <a href=\\\"https://docs.python.org/3/library/sys.html#sys.path\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"sys.path\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>sys.path</span></code></a>.  Note that each breakpoint\\\nis assigned a number to which all the other breakpoint commands refer.</p>\\\n<p style=\\\"line-height:140%;\\\">If a second argument is present, it is an expression which must evaluate to\\\ntrue before the breakpoint is honored.</p>\\\n<p style=\\\"line-height:140%;\\\">Without argument, list all breaks, including for each breakpoint, the number\\\nof times that breakpoint has been hit, the current ignore count, and the\\\nassociated condition if any.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">tbreak</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"> [([filename:]lineno | function) [, condition]]</code><a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-tbreak\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Temporary breakpoint, which is removed automatically when it is first hit.\\\nThe arguments are the same as for <a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-break\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>break</span></code></a>.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">cl(ear)</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"> [filename:lineno | bpnumber [bpnumber ...]]</code><a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-clear\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">With a <em>filename:lineno</em> argument, clear all the breakpoints at this line.\\\nWith a space separated list of breakpoint numbers, clear those breakpoints.\\\nWithout argument, clear all breaks (but first ask confirmation).</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">disable</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"> [bpnumber [bpnumber ...]]</code><a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-disable\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Disable the breakpoints given as a space separated list of breakpoint\\\nnumbers.  Disabling a breakpoint means it cannot cause the program to stop\\\nexecution, but unlike clearing a breakpoint, it remains in the list of\\\nbreakpoints and can be (re-)enabled.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">enable</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"> [bpnumber [bpnumber ...]]</code><a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-enable\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Enable the breakpoints specified.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">ignore</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"> bpnumber [count]</code><a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-ignore\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Set the ignore count for the given breakpoint number.  If count is omitted,\\\nthe ignore count is set to 0.  A breakpoint becomes active when the ignore\\\ncount is zero.  When non-zero, the count is decremented each time the\\\nbreakpoint is reached and the breakpoint is not disabled and any associated\\\ncondition evaluates to true.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">condition</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"> bpnumber [condition]</code><a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-condition\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Set a new <em>condition</em> for the breakpoint, an expression which must evaluate\\\nto true before the breakpoint is honored.  If <em>condition</em> is absent, any\\\nexisting condition is removed; i.e., the breakpoint is made unconditional.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">commands</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"> [bpnumber]</code><a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-commands\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Specify a list of commands for breakpoint number <em>bpnumber</em>.  The commands\\\nthemselves appear on the following lines.  Type a line containing just\\\n<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>end</span></code> to terminate the commands. An example:</p>\\\n<div style=\\\"position:relative;\\\"><div style=\\\"background:none;\\\"><pre style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;border:1px solid rgb(170, 204, 153);\\\"><span></span><span>(</span><span>Pdb</span><span>)</span> <span>commands</span> <span style=\\\"color:rgb(32, 128, 80);\\\">1</span>\\\n<span>(</span><span>com</span><span>)</span> <span>p</span> <span>some_variable</span>\\\n<span>(</span><span>com</span><span>)</span> <span>end</span>\\\n<span>(</span><span>Pdb</span><span>)</span>\\\n</pre></div>\\\n</div>\\\n<p style=\\\"line-height:140%;\\\">To remove all commands from a breakpoint, type <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>commands</span></code> and follow it\\\nimmediately with <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>end</span></code>; that is, give no commands.</p>\\\n<p style=\\\"line-height:140%;\\\">With no <em>bpnumber</em> argument, <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>commands</span></code> refers to the last breakpoint set.</p>\\\n<p style=\\\"line-height:140%;\\\">You can use breakpoint commands to start your program up again.  Simply use\\\nthe <a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-continue\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>continue</span></code></a> command, or <a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-step\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>step</span></code></a>,\\\nor any other command that resumes execution.</p>\\\n<p style=\\\"line-height:140%;\\\">Specifying any command resuming execution\\\n(currently <a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-continue\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>continue</span></code></a>, <a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-step\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>step</span></code></a>, <a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-next\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>next</span></code></a>,\\\n<a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-return\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>return</span></code></a>, <a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-jump\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>jump</span></code></a>, <a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-quit\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>quit</span></code></a> and their abbreviations)\\\nterminates the command list (as if\\\nthat command was immediately followed by end). This is because any time you\\\nresume execution (even with a simple next or step), you may encounter another\\\nbreakpoint—which could have its own command list, leading to ambiguities about\\\nwhich list to execute.</p>\\\n<p style=\\\"line-height:140%;\\\">If you use the ‘silent’ command in the command list, the usual message about\\\nstopping at a breakpoint is not printed.  This may be desirable for breakpoints\\\nthat are to print a specific message and then continue.  If none of the other\\\ncommands print anything, you see no sign that the breakpoint was reached.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">s(tep)</code><a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-step\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Execute the current line, stop at the first possible occasion (either in a\\\nfunction that is called or on the next line in the current function).</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">n(ext)</code><a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-next\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Continue execution until the next line in the current function is reached or\\\nit returns.  (The difference between <a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-next\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>next</span></code></a> and <a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-step\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>step</span></code></a> is\\\nthat <a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-step\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>step</span></code></a> stops inside a called function, while <a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-next\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>next</span></code></a>\\\nexecutes called functions at (nearly) full speed, only stopping at the next\\\nline in the current function.)</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">unt(il)</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"> [lineno]</code><a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-until\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Without argument, continue execution until the line with a number greater\\\nthan the current one is reached.</p>\\\n<p style=\\\"line-height:140%;\\\">With a line number, continue execution until a line with a number greater or\\\nequal to that is reached.  In both cases, also stop when the current frame\\\nreturns.</p>\\\n<div>\\\n<p style=\\\"line-height:140%;\\\"><span>Changed in version 3.2: </span>Allow giving an explicit line number.</p>\\\n</div>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">r(eturn)</code><a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-return\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Continue execution until the current function returns.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">c(ont(inue))</code><a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-continue\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Continue execution, only stop when a breakpoint is encountered.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">j(ump)</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"> lineno</code><a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-jump\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Set the next line that will be executed.  Only available in the bottom-most\\\nframe.  This lets you jump back and execute code again, or jump forward to\\\nskip code that you don’t want to run.</p>\\\n<p style=\\\"line-height:140%;\\\">It should be noted that not all jumps are allowed – for instance it is not\\\npossible to jump into the middle of a <a href=\\\"https://docs.python.org/3/reference/compound_stmts.html#for\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>for</span></code></a> loop or out of a\\\n<a href=\\\"https://docs.python.org/3/reference/compound_stmts.html#finally\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>finally</span></code></a> clause.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">l(ist)</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"> [first[, last]]</code><a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-list\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">List source code for the current file.  Without arguments, list 11 lines\\\naround the current line or continue the previous listing.  With <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>.</span></code> as\\\nargument, list 11 lines around the current line.  With one argument,\\\nlist 11 lines around at that line.  With two arguments, list the given range;\\\nif the second argument is less than the first, it is interpreted as a count.</p>\\\n<p style=\\\"line-height:140%;\\\">The current line in the current frame is indicated by <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>-&gt;</span></code>.  If an\\\nexception is being debugged, the line where the exception was originally\\\nraised or propagated is indicated by <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>&gt;&gt;</span></code>, if it differs from the current\\\nline.</p>\\\n<div>\\\n<p style=\\\"line-height:140%;\\\"><span>New in version 3.2: </span>The <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>&gt;&gt;</span></code> marker.</p>\\\n</div>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">ll</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"> | longlist</code><a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-ll\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">List all source code for the current function or frame.  Interesting lines\\\nare marked as for <a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-list\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>list</span></code></a>.</p>\\\n<div>\\\n<p style=\\\"line-height:140%;\\\"><span>New in version 3.2.</span></p>\\\n</div>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">a(rgs)</code><a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-args\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Print the argument list of the current function.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">p</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"> expression</code><a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-p\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Evaluate the <em>expression</em> in the current context and print its value.</p>\\\n<div style=\\\"border-radius:3px;\\\">\\\n<p style=\\\"line-height:140%;\\\">Note</p>\\\n<p style=\\\"line-height:140%;\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>print()</span></code> can also be used, but is not a debugger command — this executes the\\\nPython <a href=\\\"https://docs.python.org/3/library/functions.html#print\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"print\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>print()</span></code></a> function.</p>\\\n</div>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">pp</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"> expression</code><a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-pp\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Like the <a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-p\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>p</span></code></a> command, except the value of the expression is\\\npretty-printed using the <a href=\\\"https://docs.python.org/3/library/pprint.html#module-pprint\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"pprint: Data pretty printer.\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>pprint</span></code></a> module.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">whatis</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"> expression</code><a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-whatis\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Print the type of the <em>expression</em>.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">source</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"> expression</code><a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-source\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Try to get source code for the given object and display it.</p>\\\n<div>\\\n<p style=\\\"line-height:140%;\\\"><span>New in version 3.2.</span></p>\\\n</div>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">display</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"> [expression]</code><a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-display\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Display the value of the expression if it changed, each time execution stops\\\nin the current frame.</p>\\\n<p style=\\\"line-height:140%;\\\">Without expression, list all display expressions for the current frame.</p>\\\n<div>\\\n<p style=\\\"line-height:140%;\\\"><span>New in version 3.2.</span></p>\\\n</div>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">undisplay</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"> [expression]</code><a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-undisplay\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Do not display the expression any more in the current frame.  Without\\\nexpression, clear all display expressions for the current frame.</p>\\\n<div>\\\n<p style=\\\"line-height:140%;\\\"><span>New in version 3.2.</span></p>\\\n</div>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">interact</code><a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-interact\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Start an interactive interpreter (using the <a href=\\\"https://docs.python.org/3/library/code.html#module-code\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"code: Facilities to implement read-eval-print loops.\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>code</span></code></a> module) whose global\\\nnamespace contains all the (global and local) names found in the current\\\nscope.</p>\\\n<div>\\\n<p style=\\\"line-height:140%;\\\"><span>New in version 3.2.</span></p>\\\n</div>\\\n</dd></dl>\\\n\\\n<span></span><dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">alias</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"> [name [command]]</code><a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-alias\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Create an alias called <em>name</em> that executes <em>command</em>.  The command must\\\n<em>not</em> be enclosed in quotes.  Replaceable parameters can be indicated by\\\n<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>%1</span></code>, <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>%2</span></code>, and so on, while <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>%*</span></code> is replaced by all the parameters.\\\nIf no command is given, the current alias for <em>name</em> is shown. If no\\\narguments are given, all aliases are listed.</p>\\\n<p style=\\\"line-height:140%;\\\">Aliases may be nested and can contain anything that can be legally typed at\\\nthe pdb prompt.  Note that internal pdb commands <em>can</em> be overridden by\\\naliases.  Such a command is then hidden until the alias is removed.  Aliasing\\\nis recursively applied to the first word of the command line; all other words\\\nin the line are left alone.</p>\\\n<p style=\\\"line-height:140%;\\\">As an example, here are two useful aliases (especially when placed in the\\\n<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>.pdbrc</span></code> file):</p>\\\n<div style=\\\"position:relative;\\\"><div style=\\\"background:none;\\\"><pre style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;border:1px solid rgb(170, 204, 153);\\\"><span></span><span style=\\\"color:rgb(64, 128, 144);font-style:italic;\\\"># Print instance variables (usage &quot;pi classInst&quot;)</span>\\\n<span>alias</span> <span>pi</span> <span style=\\\"color:rgb(0, 112, 32);font-weight:bold;\\\">for</span> <span>k</span> <span style=\\\"color:rgb(0, 112, 32);font-weight:bold;\\\">in</span> <span style=\\\"color:rgb(102, 102, 102);\\\">%</span><span style=\\\"color:rgb(32, 128, 80);\\\">1.</span><span style=\\\"color:rgb(187, 96, 213);\\\">__dict__</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>keys</span><span>():</span> <span style=\\\"color:rgb(0, 112, 32);\\\">print</span><span>(</span><span style=\\\"color:rgb(64, 112, 160);\\\">&quot;%1.&quot;</span><span>,</span><span>k</span><span>,</span><span style=\\\"color:rgb(64, 112, 160);\\\">&quot;=&quot;</span><span>,</span><span style=\\\"color:rgb(102, 102, 102);\\\">%</span><span style=\\\"color:rgb(32, 128, 80);\\\">1.</span><span style=\\\"color:rgb(187, 96, 213);\\\">__dict__</span><span>[</span><span>k</span><span>])</span>\\\n<span style=\\\"color:rgb(64, 128, 144);font-style:italic;\\\"># Print instance variables in self</span>\\\n<span>alias</span> <span>ps</span> <span>pi</span> <span style=\\\"color:rgb(0, 112, 32);\\\">self</span>\\\n</pre></div>\\\n</div>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">unalias</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"> name</code><a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-unalias\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Delete the specified alias.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">!</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"> statement</code><a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-!\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Execute the (one-line) <em>statement</em> in the context of the current stack frame.\\\nThe exclamation point can be omitted unless the first word of the statement\\\nresembles a debugger command.  To set a global variable, you can prefix the\\\nassignment command with a <a href=\\\"https://docs.python.org/3/reference/simple_stmts.html#global\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>global</span></code></a> statement on the same line,\\\ne.g.:</p>\\\n<div style=\\\"position:relative;\\\"><div style=\\\"background:none;\\\"><pre style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;border:1px solid rgb(170, 204, 153);\\\"><span></span><span>(</span><span>Pdb</span><span>)</span> <span style=\\\"color:rgb(0, 112, 32);font-weight:bold;\\\">global</span> <span>list_options</span><span>;</span> <span>list_options</span> <span style=\\\"color:rgb(102, 102, 102);\\\">=</span> <span>[</span><span style=\\\"color:rgb(64, 112, 160);\\\">'-l'</span><span>]</span>\\\n<span>(</span><span>Pdb</span><span>)</span>\\\n</pre></div>\\\n</div>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">run</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"> [args ...]</code><a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-run\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">restart</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"> [args ...]</code><a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-restart\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Restart the debugged Python program.  If an argument is supplied, it is split\\\nwith <a href=\\\"https://docs.python.org/3/library/shlex.html#module-shlex\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"shlex: Simple lexical analysis for Unix shell-like languages.\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>shlex</span></code></a> and the result is used as the new <a href=\\\"https://docs.python.org/3/library/sys.html#sys.argv\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"sys.argv\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>sys.argv</span></code></a>.\\\nHistory, breakpoints, actions and debugger options are preserved.\\\n<a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-restart\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>restart</span></code></a> is an alias for <a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-run\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>run</span></code></a>.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">q(uit)</code><a href=\\\"https://docs.python.org/3/library/pdb.html#pdbcommand-quit\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Quit from the debugger.  The program being executed is aborted.</p>\\\n</dd></dl>\\\n\\\n<p style=\\\"line-height:140%;\\\">Footnotes</p>\\\n<dl><dt><span><a href=\\\"https://docs.python.org/3/library/pdb.html#id1\\\" style=\\\"color:rgb(0, 114, 170);\\\">1</a></span></dt><dd><p style=\\\"line-height:140%;\\\">Whether a frame is considered to originate in a certain module\\\nis determined by the <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>__name__</span></code> in the frame globals.</p>\\\n</dd></dl>\\\n</div>\\\n</div></div></div></div></div></div></div></div><div style=\\\"font-size: 16px; display:block; min-width: 100%; position: relative;\\\"> <div><div style=\\\"background-color:white;\\\"><div><div><div><div><div>\\\n<span></span><h1 style=\\\"margin:0px;border:0px;padding:0.3em 0px;\\\">The Python Profilers<a href=\\\"https://docs.python.org/3/library/profile.html#the-python-profilers\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this headline\\\">¶</a></h1>\\\n<p style=\\\"line-height:140%;\\\"><strong>Source code:</strong> <a href=\\\"https://github.com/python/cpython/tree/3.7/Lib/profile.py\\\" style=\\\"color:rgb(0, 114, 170);\\\">Lib/profile.py</a> and <a href=\\\"https://github.com/python/cpython/tree/3.7/Lib/pstats.py\\\" style=\\\"color:rgb(0, 114, 170);\\\">Lib/pstats.py</a></p>\\\n<hr style=\\\"border:0px;background-color:rgb(204, 204, 204);height:1px;\\\"/>\\\n<div>\\\n<span></span><h2 style=\\\"margin:0px;border:0px;padding:0.3em 0px;\\\">Introduction to the profilers<a href=\\\"https://docs.python.org/3/library/profile.html#introduction-to-the-profilers\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this headline\\\">¶</a></h2>\\\n<p style=\\\"line-height:140%;\\\"><a href=\\\"https://docs.python.org/3/library/profile.html#module-cProfile\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"cProfile\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>cProfile</span></code></a> and <a href=\\\"https://docs.python.org/3/library/profile.html#module-profile\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"profile: Python source profiler.\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>profile</span></code></a> provide <em>deterministic profiling</em> of\\\nPython programs. A <em>profile</em> is a set of statistics that describes how\\\noften and for how long various parts of the program executed. These statistics\\\ncan be formatted into reports via the <a href=\\\"https://docs.python.org/3/library/profile.html#module-pstats\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"pstats: Statistics object for use with the profiler.\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>pstats</span></code></a> module.</p>\\\n<p style=\\\"line-height:140%;\\\">The Python standard library provides two different implementations of the same\\\nprofiling interface:</p>\\\n<ol>\\\n<li><p style=\\\"line-height:140%;\\\"><a href=\\\"https://docs.python.org/3/library/profile.html#module-cProfile\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"cProfile\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>cProfile</span></code></a> is recommended for most users; it’s a C extension with\\\nreasonable overhead that makes it suitable for profiling long-running\\\nprograms.  Based on <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>lsprof</span></code>, contributed by Brett Rosen and Ted\\\nCzotter.</p></li>\\\n<li><p style=\\\"line-height:140%;\\\"><a href=\\\"https://docs.python.org/3/library/profile.html#module-profile\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"profile: Python source profiler.\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>profile</span></code></a>, a pure Python module whose interface is imitated by\\\n<a href=\\\"https://docs.python.org/3/library/profile.html#module-cProfile\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"cProfile\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>cProfile</span></code></a>, but which adds significant overhead to profiled programs.\\\nIf you’re trying to extend the profiler in some way, the task might be easier\\\nwith this module.  Originally designed and written by Jim Roskind.</p></li>\\\n</ol>\\\n<div style=\\\"border-radius:3px;\\\">\\\n<p style=\\\"line-height:140%;\\\">Note</p>\\\n<p style=\\\"line-height:140%;\\\">The profiler modules are designed to provide an execution profile for a given\\\nprogram, not for benchmarking purposes (for that, there is <a href=\\\"https://docs.python.org/3/library/timeit.html#module-timeit\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"timeit: Measure the execution time of small code snippets.\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>timeit</span></code></a> for\\\nreasonably accurate results).  This particularly applies to benchmarking\\\nPython code against C code: the profilers introduce overhead for Python code,\\\nbut not for C-level functions, and so the C code would seem faster than any\\\nPython one.</p>\\\n</div>\\\n</div>\\\n<div>\\\n<span></span><h2 style=\\\"margin:0px;border:0px;padding:0.3em 0px;\\\">Instant User’s Manual<a href=\\\"https://docs.python.org/3/library/profile.html#instant-user-s-manual\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this headline\\\">¶</a></h2>\\\n<p style=\\\"line-height:140%;\\\">This section is provided for users that “don’t want to read the manual.” It\\\nprovides a very brief overview, and allows a user to rapidly perform profiling\\\non an existing application.</p>\\\n<p style=\\\"line-height:140%;\\\">To profile a function that takes a single argument, you can do:</p>\\\n<div style=\\\"position:relative;\\\"><div style=\\\"background:none;\\\"><pre style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;border:1px solid rgb(170, 204, 153);\\\"><span></span><span style=\\\"color:rgb(0, 112, 32);font-weight:bold;\\\">import</span> <span style=\\\"color:rgb(14, 132, 181);font-weight:bold;\\\">cProfile</span>\\\n<span style=\\\"color:rgb(0, 112, 32);font-weight:bold;\\\">import</span> <span style=\\\"color:rgb(14, 132, 181);font-weight:bold;\\\">re</span>\\\n<span>cProfile</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>run</span><span>(</span><span style=\\\"color:rgb(64, 112, 160);\\\">'re.compile(&quot;foo|bar&quot;)'</span><span>)</span>\\\n</pre></div>\\\n</div>\\\n<p style=\\\"line-height:140%;\\\">(Use <a href=\\\"https://docs.python.org/3/library/profile.html#module-profile\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"profile: Python source profiler.\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>profile</span></code></a> instead of <a href=\\\"https://docs.python.org/3/library/profile.html#module-cProfile\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"cProfile\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>cProfile</span></code></a> if the latter is not available on\\\nyour system.)</p>\\\n<p style=\\\"line-height:140%;\\\">The above action would run <a href=\\\"https://docs.python.org/3/library/re.html#re.compile\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"re.compile\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>re.compile()</span></code></a> and print profile results like\\\nthe following:</p>\\\n<div style=\\\"position:relative;\\\"><div style=\\\"background:none;\\\"><pre style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;border:1px solid rgb(170, 204, 153);\\\"><span></span>      <span style=\\\"color:rgb(32, 128, 80);\\\">197</span> <span>function</span> <span>calls</span> <span>(</span><span style=\\\"color:rgb(32, 128, 80);\\\">192</span> <span>primitive</span> <span>calls</span><span>)</span> <span style=\\\"color:rgb(0, 112, 32);font-weight:bold;\\\">in</span> <span style=\\\"color:rgb(32, 128, 80);\\\">0.002</span> <span>seconds</span>\\\n\\\n<span>Ordered</span> <span>by</span><span>:</span> <span>standard</span> <span>name</span>\\\n\\\n<span>ncalls</span>  <span>tottime</span>  <span>percall</span>  <span>cumtime</span>  <span>percall</span> <span>filename</span><span>:</span><span>lineno</span><span>(</span><span>function</span><span>)</span>\\\n     <span style=\\\"color:rgb(32, 128, 80);\\\">1</span>    <span style=\\\"color:rgb(32, 128, 80);\\\">0.000</span>    <span style=\\\"color:rgb(32, 128, 80);\\\">0.000</span>    <span style=\\\"color:rgb(32, 128, 80);\\\">0.001</span>    <span style=\\\"color:rgb(32, 128, 80);\\\">0.001</span> <span style=\\\"color:rgb(102, 102, 102);\\\">&lt;</span><span>string</span><span style=\\\"color:rgb(102, 102, 102);\\\">&gt;</span><span>:</span><span style=\\\"color:rgb(32, 128, 80);\\\">1</span><span>(</span><span style=\\\"color:rgb(102, 102, 102);\\\">&lt;</span><span>module</span><span style=\\\"color:rgb(102, 102, 102);\\\">&gt;</span><span>)</span>\\\n     <span style=\\\"color:rgb(32, 128, 80);\\\">1</span>    <span style=\\\"color:rgb(32, 128, 80);\\\">0.000</span>    <span style=\\\"color:rgb(32, 128, 80);\\\">0.000</span>    <span style=\\\"color:rgb(32, 128, 80);\\\">0.001</span>    <span style=\\\"color:rgb(32, 128, 80);\\\">0.001</span> <span>re</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>py</span><span>:</span><span style=\\\"color:rgb(32, 128, 80);\\\">212</span><span>(</span><span style=\\\"color:rgb(0, 112, 32);\\\">compile</span><span>)</span>\\\n     <span style=\\\"color:rgb(32, 128, 80);\\\">1</span>    <span style=\\\"color:rgb(32, 128, 80);\\\">0.000</span>    <span style=\\\"color:rgb(32, 128, 80);\\\">0.000</span>    <span style=\\\"color:rgb(32, 128, 80);\\\">0.001</span>    <span style=\\\"color:rgb(32, 128, 80);\\\">0.001</span> <span>re</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>py</span><span>:</span><span style=\\\"color:rgb(32, 128, 80);\\\">268</span><span>(</span><span>_compile</span><span>)</span>\\\n     <span style=\\\"color:rgb(32, 128, 80);\\\">1</span>    <span style=\\\"color:rgb(32, 128, 80);\\\">0.000</span>    <span style=\\\"color:rgb(32, 128, 80);\\\">0.000</span>    <span style=\\\"color:rgb(32, 128, 80);\\\">0.000</span>    <span style=\\\"color:rgb(32, 128, 80);\\\">0.000</span> <span>sre_compile</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>py</span><span>:</span><span style=\\\"color:rgb(32, 128, 80);\\\">172</span><span>(</span><span>_compile_charset</span><span>)</span>\\\n     <span style=\\\"color:rgb(32, 128, 80);\\\">1</span>    <span style=\\\"color:rgb(32, 128, 80);\\\">0.000</span>    <span style=\\\"color:rgb(32, 128, 80);\\\">0.000</span>    <span style=\\\"color:rgb(32, 128, 80);\\\">0.000</span>    <span style=\\\"color:rgb(32, 128, 80);\\\">0.000</span> <span>sre_compile</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>py</span><span>:</span><span style=\\\"color:rgb(32, 128, 80);\\\">201</span><span>(</span><span>_optimize_charset</span><span>)</span>\\\n     <span style=\\\"color:rgb(32, 128, 80);\\\">4</span>    <span style=\\\"color:rgb(32, 128, 80);\\\">0.000</span>    <span style=\\\"color:rgb(32, 128, 80);\\\">0.000</span>    <span style=\\\"color:rgb(32, 128, 80);\\\">0.000</span>    <span style=\\\"color:rgb(32, 128, 80);\\\">0.000</span> <span>sre_compile</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>py</span><span>:</span><span style=\\\"color:rgb(32, 128, 80);\\\">25</span><span>(</span><span>_identityfunction</span><span>)</span>\\\n   <span style=\\\"color:rgb(32, 128, 80);\\\">3</span><span style=\\\"color:rgb(102, 102, 102);\\\">/</span><span style=\\\"color:rgb(32, 128, 80);\\\">1</span>    <span style=\\\"color:rgb(32, 128, 80);\\\">0.000</span>    <span style=\\\"color:rgb(32, 128, 80);\\\">0.000</span>    <span style=\\\"color:rgb(32, 128, 80);\\\">0.000</span>    <span style=\\\"color:rgb(32, 128, 80);\\\">0.000</span> <span>sre_compile</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>py</span><span>:</span><span style=\\\"color:rgb(32, 128, 80);\\\">33</span><span>(</span><span>_compile</span><span>)</span>\\\n</pre></div>\\\n</div>\\\n<p style=\\\"line-height:140%;\\\">The first line indicates that 197 calls were monitored.  Of those calls, 192\\\nwere <em>primitive</em>, meaning that the call was not induced via recursion. The\\\nnext line: <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>Ordered</span> <span>by:</span> <span>standard</span> <span>name</span></code>, indicates that the text string in the\\\nfar right column was used to sort the output. The column headings include:</p>\\\n<dl><dt>ncalls</dt><dd><p style=\\\"line-height:140%;\\\">for the number of calls.</p>\\\n</dd><dt>tottime</dt><dd><p style=\\\"line-height:140%;\\\">for the total time spent in the given function (and excluding time made in\\\ncalls to sub-functions)</p>\\\n</dd><dt>percall</dt><dd><p style=\\\"line-height:140%;\\\">is the quotient of <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>tottime</span></code> divided by <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>ncalls</span></code></p>\\\n</dd><dt>cumtime</dt><dd><p style=\\\"line-height:140%;\\\">is the cumulative time spent in this and all subfunctions (from invocation\\\ntill exit). This figure is accurate <em>even</em> for recursive functions.</p>\\\n</dd><dt>percall</dt><dd><p style=\\\"line-height:140%;\\\">is the quotient of <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>cumtime</span></code> divided by primitive calls</p>\\\n</dd><dt>filename:lineno(function)</dt><dd><p style=\\\"line-height:140%;\\\">provides the respective data of each function</p>\\\n</dd></dl>\\\n<p style=\\\"line-height:140%;\\\">When there are two numbers in the first column (for example <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>3/1</span></code>), it means\\\nthat the function recursed.  The second value is the number of primitive calls\\\nand the former is the total number of calls.  Note that when the function does\\\nnot recurse, these two values are the same, and only the single figure is\\\nprinted.</p>\\\n<p style=\\\"line-height:140%;\\\">Instead of printing the output at the end of the profile run, you can save the\\\nresults to a file by specifying a filename to the <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>run()</span></code> function:</p>\\\n<div style=\\\"position:relative;\\\"><div style=\\\"background:none;\\\"><pre style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;border:1px solid rgb(170, 204, 153);\\\"><span></span><span style=\\\"color:rgb(0, 112, 32);font-weight:bold;\\\">import</span> <span style=\\\"color:rgb(14, 132, 181);font-weight:bold;\\\">cProfile</span>\\\n<span style=\\\"color:rgb(0, 112, 32);font-weight:bold;\\\">import</span> <span style=\\\"color:rgb(14, 132, 181);font-weight:bold;\\\">re</span>\\\n<span>cProfile</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>run</span><span>(</span><span style=\\\"color:rgb(64, 112, 160);\\\">'re.compile(&quot;foo|bar&quot;)'</span><span>,</span> <span style=\\\"color:rgb(64, 112, 160);\\\">'restats'</span><span>)</span>\\\n</pre></div>\\\n</div>\\\n<p style=\\\"line-height:140%;\\\">The <a href=\\\"https://docs.python.org/3/library/profile.html#pstats.Stats\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"pstats.Stats\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>pstats.Stats</span></code></a> class reads profile results from a file and formats\\\nthem in various ways.</p>\\\n<p style=\\\"line-height:140%;\\\">The file <a href=\\\"https://docs.python.org/3/library/profile.html#module-cProfile\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"cProfile\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>cProfile</span></code></a> can also be invoked as a script to profile another\\\nscript.  For example:</p>\\\n<div style=\\\"position:relative;\\\"><div style=\\\"background:none;\\\"><pre style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;border:1px solid rgb(170, 204, 153);\\\"><span></span><span>python</span> <span style=\\\"color:rgb(102, 102, 102);\\\">-</span><span>m</span> <span>cProfile</span> <span>[</span><span style=\\\"color:rgb(102, 102, 102);\\\">-</span><span>o</span> <span>output_file</span><span>]</span> <span>[</span><span style=\\\"color:rgb(102, 102, 102);\\\">-</span><span>s</span> <span>sort_order</span><span>]</span> <span>(</span><span style=\\\"color:rgb(102, 102, 102);\\\">-</span><span>m</span> <span>module</span> <span style=\\\"color:rgb(102, 102, 102);\\\">|</span> <span>myscript</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>py</span><span>)</span>\\\n</pre></div>\\\n</div>\\\n<p style=\\\"line-height:140%;\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>-o</span></code> writes the profile results to a file instead of to stdout</p>\\\n<p style=\\\"line-height:140%;\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>-s</span></code> specifies one of the <a href=\\\"https://docs.python.org/3/library/profile.html#pstats.Stats.sort_stats\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"pstats.Stats.sort_stats\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>sort_stats()</span></code></a> sort values to sort\\\nthe output by. This only applies when <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>-o</span></code> is not supplied.</p>\\\n<p style=\\\"line-height:140%;\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>-m</span></code> specifies that a module is being profiled instead of a script.</p>\\\n<blockquote>\\\n<div><div>\\\n<p style=\\\"line-height:140%;\\\"><span>New in version 3.7: </span>Added the <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>-m</span></code> option.</p>\\\n</div>\\\n</div></blockquote>\\\n<p style=\\\"line-height:140%;\\\">The <a href=\\\"https://docs.python.org/3/library/profile.html#module-pstats\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"pstats: Statistics object for use with the profiler.\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>pstats</span></code></a> module’s <a href=\\\"https://docs.python.org/3/library/profile.html#pstats.Stats\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"pstats.Stats\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>Stats</span></code></a> class has a variety of methods\\\nfor manipulating and printing the data saved into a profile results file:</p>\\\n<div style=\\\"position:relative;\\\"><div style=\\\"background:none;\\\"><pre style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;border:1px solid rgb(170, 204, 153);\\\"><span></span><span style=\\\"color:rgb(0, 112, 32);font-weight:bold;\\\">import</span> <span style=\\\"color:rgb(14, 132, 181);font-weight:bold;\\\">pstats</span>\\\n<span style=\\\"color:rgb(0, 112, 32);font-weight:bold;\\\">from</span> <span style=\\\"color:rgb(14, 132, 181);font-weight:bold;\\\">pstats</span> <span style=\\\"color:rgb(0, 112, 32);font-weight:bold;\\\">import</span> <span>SortKey</span>\\\n<span>p</span> <span style=\\\"color:rgb(102, 102, 102);\\\">=</span> <span>pstats</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>Stats</span><span>(</span><span style=\\\"color:rgb(64, 112, 160);\\\">'restats'</span><span>)</span>\\\n<span>p</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>strip_dirs</span><span>()</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>sort_stats</span><span>(</span><span style=\\\"color:rgb(102, 102, 102);\\\">-</span><span style=\\\"color:rgb(32, 128, 80);\\\">1</span><span>)</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>print_stats</span><span>()</span>\\\n</pre></div>\\\n</div>\\\n<p style=\\\"line-height:140%;\\\">The <a href=\\\"https://docs.python.org/3/library/profile.html#pstats.Stats.strip_dirs\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"pstats.Stats.strip_dirs\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>strip_dirs()</span></code></a> method removed the extraneous path from all\\\nthe module names. The <a href=\\\"https://docs.python.org/3/library/profile.html#pstats.Stats.sort_stats\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"pstats.Stats.sort_stats\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>sort_stats()</span></code></a> method sorted all the\\\nentries according to the standard module/line/name string that is printed. The\\\n<a href=\\\"https://docs.python.org/3/library/profile.html#pstats.Stats.print_stats\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"pstats.Stats.print_stats\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>print_stats()</span></code></a> method printed out all the statistics.  You\\\nmight try the following sort calls:</p>\\\n<div style=\\\"position:relative;\\\"><div style=\\\"background:none;\\\"><pre style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;border:1px solid rgb(170, 204, 153);\\\"><span></span><span>p</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>sort_stats</span><span>(</span><span>SortKey</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>NAME</span><span>)</span>\\\n<span>p</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>print_stats</span><span>()</span>\\\n</pre></div>\\\n</div>\\\n<p style=\\\"line-height:140%;\\\">The first call will actually sort the list by function name, and the second call\\\nwill print out the statistics.  The following are some interesting calls to\\\nexperiment with:</p>\\\n<div style=\\\"position:relative;\\\"><div style=\\\"background:none;\\\"><pre style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;border:1px solid rgb(170, 204, 153);\\\"><span></span><span>p</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>sort_stats</span><span>(</span><span>SortKey</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>CUMULATIVE</span><span>)</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>print_stats</span><span>(</span><span style=\\\"color:rgb(32, 128, 80);\\\">10</span><span>)</span>\\\n</pre></div>\\\n</div>\\\n<p style=\\\"line-height:140%;\\\">This sorts the profile by cumulative time in a function, and then only prints\\\nthe ten most significant lines.  If you want to understand what algorithms are\\\ntaking time, the above line is what you would use.</p>\\\n<p style=\\\"line-height:140%;\\\">If you were looking to see what functions were looping a lot, and taking a lot\\\nof time, you would do:</p>\\\n<div style=\\\"position:relative;\\\"><div style=\\\"background:none;\\\"><pre style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;border:1px solid rgb(170, 204, 153);\\\"><span></span><span>p</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>sort_stats</span><span>(</span><span>SortKey</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>TIME</span><span>)</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>print_stats</span><span>(</span><span style=\\\"color:rgb(32, 128, 80);\\\">10</span><span>)</span>\\\n</pre></div>\\\n</div>\\\n<p style=\\\"line-height:140%;\\\">to sort according to time spent within each function, and then print the\\\nstatistics for the top ten functions.</p>\\\n<p style=\\\"line-height:140%;\\\">You might also try:</p>\\\n<div style=\\\"position:relative;\\\"><div style=\\\"background:none;\\\"><pre style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;border:1px solid rgb(170, 204, 153);\\\"><span></span><span>p</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>sort_stats</span><span>(</span><span>SortKey</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>FILENAME</span><span>)</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>print_stats</span><span>(</span><span style=\\\"color:rgb(64, 112, 160);\\\">'__init__'</span><span>)</span>\\\n</pre></div>\\\n</div>\\\n<p style=\\\"line-height:140%;\\\">This will sort all the statistics by file name, and then print out statistics\\\nfor only the class init methods (since they are spelled with <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>__init__</span></code> in\\\nthem).  As one final example, you could try:</p>\\\n<div style=\\\"position:relative;\\\"><div style=\\\"background:none;\\\"><pre style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;border:1px solid rgb(170, 204, 153);\\\"><span></span><span>p</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>sort_stats</span><span>(</span><span>SortKey</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>TIME</span><span>,</span> <span>SortKey</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>CUMULATIVE</span></pre></div></div></div></div>\\\n\\\n  \\\n</div></div></div></div></div></div></div><div style=\\\"font-size: 16px; display:block; min-width: 100%; position: relative;\\\"> <div><div style=\\\"background-color:white;\\\"><div><div><div><div><div>\\\n<span></span><h1 style=\\\"margin:0px;border:0px;padding:0.3em 0px;\\\"><a href=\\\"https://docs.python.org/3/library/timeit.html#module-timeit\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"timeit: Measure the execution time of small code snippets.\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>timeit</span></code></a> — Measure execution time of small code snippets<a href=\\\"https://docs.python.org/3/library/timeit.html#module-timeit\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this headline\\\">¶</a></h1>\\\n<p style=\\\"line-height:140%;\\\"><strong>Source code:</strong> <a href=\\\"https://github.com/python/cpython/tree/3.7/Lib/timeit.py\\\" style=\\\"color:rgb(0, 114, 170);\\\">Lib/timeit.py</a></p>\\\n<hr style=\\\"border:0px;background-color:rgb(204, 204, 204);height:1px;\\\"/>\\\n<p style=\\\"line-height:140%;\\\">This module provides a simple way to time small bits of Python code. It has both\\\na <a href=\\\"https://docs.python.org/3/library/timeit.html#timeit-command-line-interface\\\" style=\\\"color:rgb(0, 114, 170);\\\"><span>Command-Line Interface</span></a> as well as a <a href=\\\"https://docs.python.org/3/library/timeit.html#python-interface\\\" style=\\\"color:rgb(0, 114, 170);\\\"><span>callable</span></a>\\\none.  It avoids a number of common traps for measuring execution times.\\\nSee also Tim Peters’ introduction to the “Algorithms” chapter in the <em>Python\\\nCookbook</em>, published by O’Reilly.</p>\\\n<div>\\\n<h2 style=\\\"margin:0px;border:0px;padding:0.3em 0px;\\\">Basic Examples<a href=\\\"https://docs.python.org/3/library/timeit.html#basic-examples\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this headline\\\">¶</a></h2>\\\n<p style=\\\"line-height:140%;\\\">The following example shows how the <a href=\\\"https://docs.python.org/3/library/timeit.html#timeit-command-line-interface\\\" style=\\\"color:rgb(0, 114, 170);\\\"><span>Command-Line Interface</span></a>\\\ncan be used to compare three different expressions:</p>\\\n<div><div style=\\\"background:none;\\\"><pre style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;border:1px solid rgb(170, 204, 153);\\\"><span></span><span style=\\\"color:rgb(198, 93, 9);font-weight:bold;\\\">$</span> python3 -m timeit <span style=\\\"color:rgb(64, 112, 160);\\\">'&quot;-&quot;.join(str(n) for n in range(100))'</span>\\\n<span style=\\\"color:rgb(51, 51, 51);\\\">10000 loops, best of 5: 30.2 usec per loop</span>\\\n<span style=\\\"color:rgb(198, 93, 9);font-weight:bold;\\\">$</span> python3 -m timeit <span style=\\\"color:rgb(64, 112, 160);\\\">'&quot;-&quot;.join([str(n) for n in range(100)])'</span>\\\n<span style=\\\"color:rgb(51, 51, 51);\\\">10000 loops, best of 5: 27.5 usec per loop</span>\\\n<span style=\\\"color:rgb(198, 93, 9);font-weight:bold;\\\">$</span> python3 -m timeit <span style=\\\"color:rgb(64, 112, 160);\\\">'&quot;-&quot;.join(map(str, range(100)))'</span>\\\n<span style=\\\"color:rgb(51, 51, 51);\\\">10000 loops, best of 5: 23.2 usec per loop</span>\\\n</pre></div>\\\n</div>\\\n<p style=\\\"line-height:140%;\\\">This can be achieved from the <a href=\\\"https://docs.python.org/3/library/timeit.html#python-interface\\\" style=\\\"color:rgb(0, 114, 170);\\\"><span>Python Interface</span></a> with:</p>\\\n<div style=\\\"position:relative;\\\"><div style=\\\"background:none;\\\"><span style=\\\"cursor:pointer;position:absolute;top:0px;right:0px;border-color:rgb(170, 204, 153);border-style:solid;border-width:1px;color:rgb(170, 204, 153);font-family:monospace;padding-left:0.2em;padding-right:0.2em;border-radius:0px 3px 0px 0px;\\\" title=\\\"Hide the prompts and output\\\">&gt;&gt;&gt;</span><pre style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;border:1px solid rgb(170, 204, 153);\\\"><span></span><span style=\\\"color:rgb(198, 93, 9);font-weight:bold;\\\">&gt;&gt;&gt; </span><span style=\\\"color:rgb(0, 112, 32);font-weight:bold;\\\">import</span> <span style=\\\"color:rgb(14, 132, 181);font-weight:bold;\\\">timeit</span>\\\n<span style=\\\"color:rgb(198, 93, 9);font-weight:bold;\\\">&gt;&gt;&gt; </span><span>timeit</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>timeit</span><span>(</span><span style=\\\"color:rgb(64, 112, 160);\\\">'&quot;-&quot;.join(str(n) for n in range(100))'</span><span>,</span> <span>number</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">10000</span><span>)</span>\\\n<span style=\\\"color:rgb(51, 51, 51);\\\">0.3018611848820001</span>\\\n<span style=\\\"color:rgb(198, 93, 9);font-weight:bold;\\\">&gt;&gt;&gt; </span><span>timeit</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>timeit</span><span>(</span><span style=\\\"color:rgb(64, 112, 160);\\\">'&quot;-&quot;.join([str(n) for n in range(100)])'</span><span>,</span> <span>number</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">10000</span><span>)</span>\\\n<span style=\\\"color:rgb(51, 51, 51);\\\">0.2727368790656328</span>\\\n<span style=\\\"color:rgb(198, 93, 9);font-weight:bold;\\\">&gt;&gt;&gt; </span><span>timeit</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>timeit</span><span>(</span><span style=\\\"color:rgb(64, 112, 160);\\\">'&quot;-&quot;.join(map(str, range(100)))'</span><span>,</span> <span>number</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">10000</span><span>)</span>\\\n<span style=\\\"color:rgb(51, 51, 51);\\\">0.23702679807320237</span>\\\n</pre></div>\\\n</div>\\\n<p style=\\\"line-height:140%;\\\">A callable can also be passed from the <a href=\\\"https://docs.python.org/3/library/timeit.html#python-interface\\\" style=\\\"color:rgb(0, 114, 170);\\\"><span>Python Interface</span></a>:</p>\\\n<div style=\\\"position:relative;\\\"><div style=\\\"background:none;\\\"><span style=\\\"cursor:pointer;position:absolute;top:0px;right:0px;border-color:rgb(170, 204, 153);border-style:solid;border-width:1px;color:rgb(170, 204, 153);font-family:monospace;padding-left:0.2em;padding-right:0.2em;border-radius:0px 3px 0px 0px;\\\" title=\\\"Hide the prompts and output\\\">&gt;&gt;&gt;</span><pre style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;border:1px solid rgb(170, 204, 153);\\\"><span></span><span style=\\\"color:rgb(198, 93, 9);font-weight:bold;\\\">&gt;&gt;&gt; </span><span>timeit</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>timeit</span><span>(</span><span style=\\\"color:rgb(0, 112, 32);font-weight:bold;\\\">lambda</span><span>:</span> <span style=\\\"color:rgb(64, 112, 160);\\\">&quot;-&quot;</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>join</span><span>(</span><span style=\\\"color:rgb(0, 112, 32);\\\">map</span><span>(</span><span style=\\\"color:rgb(0, 112, 32);\\\">str</span><span>,</span> <span style=\\\"color:rgb(0, 112, 32);\\\">range</span><span>(</span><span style=\\\"color:rgb(32, 128, 80);\\\">100</span><span>))),</span> <span>number</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">10000</span><span>)</span>\\\n<span style=\\\"color:rgb(51, 51, 51);\\\">0.19665591977536678</span>\\\n</pre></div>\\\n</div>\\\n<p style=\\\"line-height:140%;\\\">Note however that <a href=\\\"https://docs.python.org/3/library/timeit.html#timeit.timeit\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"timeit.timeit\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>timeit()</span></code></a> will automatically determine the number of\\\nrepetitions only when the command-line interface is used.  In the\\\n<a href=\\\"https://docs.python.org/3/library/timeit.html#timeit-examples\\\" style=\\\"color:rgb(0, 114, 170);\\\"><span>Examples</span></a> section you can find more advanced examples.</p>\\\n</div>\\\n<div>\\\n<span></span><h2 style=\\\"margin:0px;border:0px;padding:0.3em 0px;\\\">Python Interface<a href=\\\"https://docs.python.org/3/library/timeit.html#python-interface\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this headline\\\">¶</a></h2>\\\n<p style=\\\"line-height:140%;\\\">The module defines three convenience functions and a public class:</p>\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">timeit.</code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">timeit</code><span>(</span><em>stmt='pass'</em>, <em>setup='pass'</em>, <em>timer=&lt;default timer&gt;</em>, <em>number=1000000</em>, <em>globals=None</em><span>)</span><a href=\\\"https://docs.python.org/3/library/timeit.html#timeit.timeit\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Create a <a href=\\\"https://docs.python.org/3/library/timeit.html#timeit.Timer\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"timeit.Timer\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>Timer</span></code></a> instance with the given statement, <em>setup</em> code and\\\n<em>timer</em> function and run its <a href=\\\"https://docs.python.org/3/library/timeit.html#timeit.Timer.timeit\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"timeit.Timer.timeit\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>timeit()</span></code></a> method with <em>number</em> executions.\\\nThe optional <em>globals</em> argument specifies a namespace in which to execute the\\\ncode.</p>\\\n<div>\\\n<p style=\\\"line-height:140%;\\\"><span>Changed in version 3.5: </span>The optional <em>globals</em> parameter was added.</p>\\\n</div>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">timeit.</code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">repeat</code><span>(</span><em>stmt='pass'</em>, <em>setup='pass'</em>, <em>timer=&lt;default timer&gt;</em>, <em>repeat=5</em>, <em>number=1000000</em>, <em>globals=None</em><span>)</span><a href=\\\"https://docs.python.org/3/library/timeit.html#timeit.repeat\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Create a <a href=\\\"https://docs.python.org/3/library/timeit.html#timeit.Timer\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"timeit.Timer\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>Timer</span></code></a> instance with the given statement, <em>setup</em> code and\\\n<em>timer</em> function and run its <a href=\\\"https://docs.python.org/3/library/timeit.html#timeit.Timer.repeat\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"timeit.Timer.repeat\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>repeat()</span></code></a> method with the given <em>repeat</em>\\\ncount and <em>number</em> executions.  The optional <em>globals</em> argument specifies a\\\nnamespace in which to execute the code.</p>\\\n<div>\\\n<p style=\\\"line-height:140%;\\\"><span>Changed in version 3.5: </span>The optional <em>globals</em> parameter was added.</p>\\\n</div>\\\n<div>\\\n<p style=\\\"line-height:140%;\\\"><span>Changed in version 3.7: </span>Default value of <em>repeat</em> changed from 3 to 5.</p>\\\n</div>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">timeit.</code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">default_timer</code><span>(</span><span>)</span><a href=\\\"https://docs.python.org/3/library/timeit.html#timeit.default_timer\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">The default timer, which is always <a href=\\\"https://docs.python.org/3/library/time.html#time.perf_counter\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"time.perf_counter\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>time.perf_counter()</span></code></a>.</p>\\\n<div>\\\n<p style=\\\"line-height:140%;\\\"><span>Changed in version 3.3: </span><a href=\\\"https://docs.python.org/3/library/time.html#time.perf_counter\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"time.perf_counter\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>time.perf_counter()</span></code></a> is now the default timer.</p>\\\n</div>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<em>class </em><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">timeit.</code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">Timer</code><span>(</span><em>stmt='pass'</em>, <em>setup='pass'</em>, <em>timer=&lt;timer function&gt;</em>, <em>globals=None</em><span>)</span><a href=\\\"https://docs.python.org/3/library/timeit.html#timeit.Timer\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Class for timing execution speed of small code snippets.</p>\\\n<p style=\\\"line-height:140%;\\\">The constructor takes a statement to be timed, an additional statement used\\\nfor setup, and a timer function.  Both statements default to <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>'pass'</span></code>;\\\nthe timer function is platform-dependent (see the module doc string).\\\n<em>stmt</em> and <em>setup</em> may also contain multiple statements separated by <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>;</span></code>\\\nor newlines, as long as they don’t contain multi-line string literals.  The\\\nstatement will by default be executed within timeit’s namespace; this behavior\\\ncan be controlled by passing a namespace to <em>globals</em>.</p>\\\n<p style=\\\"line-height:140%;\\\">To measure the execution time of the first statement, use the <a href=\\\"https://docs.python.org/3/library/timeit.html#timeit.Timer.timeit\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"timeit.Timer.timeit\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>timeit()</span></code></a>\\\nmethod.  The <a href=\\\"https://docs.python.org/3/library/timeit.html#timeit.Timer.repeat\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"timeit.Timer.repeat\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>repeat()</span></code></a> and <a href=\\\"https://docs.python.org/3/library/timeit.html#timeit.Timer.autorange\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"timeit.Timer.autorange\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>autorange()</span></code></a> methods are convenience\\\nmethods to call <a href=\\\"https://docs.python.org/3/library/timeit.html#timeit.Timer.timeit\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"timeit.Timer.timeit\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>timeit()</span></code></a> multiple times.</p>\\\n<p style=\\\"line-height:140%;\\\">The execution time of <em>setup</em> is excluded from the overall timed execution run.</p>\\\n<p style=\\\"line-height:140%;\\\">The <em>stmt</em> and <em>setup</em> parameters can also take objects that are callable\\\nwithout arguments.  This will embed calls to them in a timer function that\\\nwill then be executed by <a href=\\\"https://docs.python.org/3/library/timeit.html#timeit.Timer.timeit\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"timeit.Timer.timeit\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>timeit()</span></code></a>.  Note that the timing overhead is a\\\nlittle larger in this case because of the extra function calls.</p>\\\n<div>\\\n<p style=\\\"line-height:140%;\\\"><span>Changed in version 3.5: </span>The optional <em>globals</em> parameter was added.</p>\\\n</div>\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">timeit</code><span>(</span><em>number=1000000</em><span>)</span><a href=\\\"https://docs.python.org/3/library/timeit.html#timeit.Timer.timeit\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Time <em>number</em> executions of the main statement.  This executes the setup\\\nstatement once, and then returns the time it takes to execute the main\\\nstatement a number of times, measured in seconds as a float.\\\nThe argument is the number of times through the loop, defaulting to one\\\nmillion.  The main statement, the setup statement and the timer function\\\nto be used are passed to the constructor.</p>\\\n<div style=\\\"border-radius:3px;\\\">\\\n<p style=\\\"line-height:140%;\\\">Note</p>\\\n<p style=\\\"line-height:140%;\\\">By default, <a href=\\\"https://docs.python.org/3/library/timeit.html#timeit.Timer.timeit\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"timeit.Timer.timeit\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>timeit()</span></code></a> temporarily turns off <a href=\\\"https://docs.python.org/3/glossary.html#term-garbage-collection\\\" style=\\\"color:rgb(0, 114, 170);\\\"><span>garbage\\\ncollection</span></a> during the timing.  The advantage of this approach is that\\\nit makes independent timings more comparable.  The disadvantage is\\\nthat GC may be an important component of the performance of the\\\nfunction being measured.  If so, GC can be re-enabled as the first\\\nstatement in the <em>setup</em> string.  For example:</p>\\\n<div style=\\\"position:relative;\\\"><div style=\\\"background:none;\\\"><pre style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;border:1px solid rgb(170, 204, 153);\\\"><span></span><span>timeit</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>Timer</span><span>(</span><span style=\\\"color:rgb(64, 112, 160);\\\">'for i in range(10): oct(i)'</span><span>,</span> <span style=\\\"color:rgb(64, 112, 160);\\\">'gc.enable()'</span><span>)</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>timeit</span><span>()</span>\\\n</pre></div>\\\n</div>\\\n</div>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">autorange</code><span>(</span><em>callback=None</em><span>)</span><a href=\\\"https://docs.python.org/3/library/timeit.html#timeit.Timer.autorange\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Automatically determine how many times to call <a href=\\\"https://docs.python.org/3/library/timeit.html#timeit.Timer.timeit\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"timeit.Timer.timeit\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>timeit()</span></code></a>.</p>\\\n<p style=\\\"line-height:140%;\\\">This is a convenience function that calls <a href=\\\"https://docs.python.org/3/library/timeit.html#timeit.Timer.timeit\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"timeit.Timer.timeit\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>timeit()</span></code></a> repeatedly\\\nso that the total time &gt;= 0.2 second, returning the eventual\\\n(number of loops, time taken for that number of loops). It calls\\\n<a href=\\\"https://docs.python.org/3/library/timeit.html#timeit.Timer.timeit\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"timeit.Timer.timeit\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>timeit()</span></code></a> with increasing numbers from the sequence 1, 2, 5,\\\n10, 20, 50, … until the time taken is at least 0.2 second.</p>\\\n<p style=\\\"line-height:140%;\\\">If <em>callback</em> is given and is not <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>None</span></code>, it will be called after\\\neach trial with two arguments: <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>callback(number,</span> <span>time_taken)</span></code>.</p>\\\n<div>\\\n<p style=\\\"line-height:140%;\\\"><span>New in version 3.6.</span></p>\\\n</div>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">repeat</code><span>(</span><em>repeat=5</em>, <em>number=1000000</em><span>)</span><a href=\\\"https://docs.python.org/3/library/timeit.html#timeit.Timer.repeat\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Call <a href=\\\"https://docs.python.org/3/library/timeit.html#timeit.Timer.timeit\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"timeit.Timer.timeit\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>timeit()</span></code></a> a few times.</p>\\\n<p style=\\\"line-height:140%;\\\">This is a convenience function that calls the <a href=\\\"https://docs.python.org/3/library/timeit.html#timeit.Timer.timeit\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"timeit.Timer.timeit\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>timeit()</span></code></a> repeatedly,\\\nreturning a list of results.  The first argument specifies how many times\\\nto call <a href=\\\"https://docs.python.org/3/library/timeit.html#timeit.Timer.timeit\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"timeit.Timer.timeit\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>timeit()</span></code></a>.  The second argument specifies the <em>number</em>\\\nargument for <a href=\\\"https://docs.python.org/3/library/timeit.html#timeit.Timer.timeit\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"timeit.Timer.timeit\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>timeit()</span></code></a>.</p>\\\n<div style=\\\"border-radius:3px;\\\">\\\n<p style=\\\"line-height:140%;\\\">Note</p>\\\n<p style=\\\"line-height:140%;\\\">It’s tempting to calculate mean and standard deviation from the result\\\nvector and report these.  However, this is not very useful.\\\nIn a typical case, the lowest value gives a lower bound for how fast\\\nyour machine can run the given code snippet; higher values in the\\\nresult vector are typically not caused by variability in Python’s\\\nspeed, but by other processes interfering with your timing accuracy.\\\nSo the <a href=\\\"https://docs.python.org/3/library/functions.html#min\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"min\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>min()</span></code></a> of the result is probably the only number you\\\nshould be interested in.  After that, you should look at the entire\\\nvector and apply common sense rather than statistics.</p>\\\n</div>\\\n<div>\\\n<p style=\\\"line-height:140%;\\\"><span>Changed in version 3.7: </span>Default value of <em>repeat</em> changed from 3 to 5.</p>\\\n</div>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">print_exc</code><span>(</span><em>file=None</em><span>)</span><a href=\\\"https://docs.python.org/3/library/timeit.html#timeit.Timer.print_exc\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Helper to print a traceback from the timed code.</p>\\\n<p style=\\\"line-height:140%;\\\">Typical use:</p>\\\n<div style=\\\"position:relative;\\\"><div style=\\\"background:none;\\\"><pre style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;border:1px solid rgb(170, 204, 153);\\\"><span></span><span>t</span> <span style=\\\"color:rgb(102, 102, 102);\\\">=</span> <span>Timer</span><span>(</span><span style=\\\"color:rgb(102, 102, 102);\\\">...</span><span>)</span>       <span style=\\\"color:rgb(64, 128, 144);font-style:italic;\\\"># outside the try/except</span>\\\n<span style=\\\"color:rgb(0, 112, 32);font-weight:bold;\\\">try</span><span>:</span>\\\n    <span>t</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>timeit</span><span>(</span><span style=\\\"color:rgb(102, 102, 102);\\\">...</span><span>)</span>    <span style=\\\"color:rgb(64, 128, 144);font-style:italic;\\\"># or t.repeat(...)</span>\\\n<span style=\\\"color:rgb(0, 112, 32);font-weight:bold;\\\">except</span> <span style=\\\"color:rgb(0, 112, 32);\\\">Exception</span><span>:</span>\\\n    <span>t</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>print_exc</span><span>()</span>\\\n</pre></div>\\\n</div>\\\n<p style=\\\"line-height:140%;\\\">The advantage over the standard traceback is that source lines in the\\\ncompiled template will be displayed.  The optional <em>file</em> argument directs\\\nwhere the traceback is sent; it defaults to <a href=\\\"https://docs.python.org/3/library/sys.html#sys.stderr\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"sys.stderr\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>sys.stderr</span></code></a>.</p>\\\n</dd></dl>\\\n\\\n</dd></dl>\\\n\\\n</div>\\\n<div>\\\n<span></span><h2 style=\\\"margin:0px;border:0px;padding:0.3em 0px;\\\">Command-Line Interface<a href=\\\"https://docs.python.org/3/library/timeit.html#command-line-interface\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this headline\\\">¶</a></h2>\\\n<p style=\\\"line-height:140%;\\\">When called as a program from the command line, the following form is used:</p>\\\n<div style=\\\"position:relative;\\\"><div style=\\\"background:none;\\\"><pre style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;border:1px solid rgb(170, 204, 153);\\\"><span></span><span>python</span> <span style=\\\"color:rgb(102, 102, 102);\\\">-</span><span>m</span> <span>timeit</span> <span>[</span><span style=\\\"color:rgb(102, 102, 102);\\\">-</span><span>n</span> <span>N</span><span>]</span> <span>[</span><span style=\\\"color:rgb(102, 102, 102);\\\">-</span><span>r</span> <span>N</span><span>]</span> <span>[</span><span style=\\\"color:rgb(102, 102, 102);\\\">-</span><span>u</span> <span>U</span><span>]</span> <span>[</span><span style=\\\"color:rgb(102, 102, 102);\\\">-</span><span>s</span> <span>S</span><span>]</span> <span>[</span><span style=\\\"color:rgb(102, 102, 102);\\\">-</span><span>h</span><span>]</span> <span>[</span><span>statement</span> <span style=\\\"color:rgb(102, 102, 102);\\\">...</span><span>]</span>\\\n</pre></div>\\\n</div>\\\n<p style=\\\"line-height:140%;\\\">Where the following options are understood:</p>\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">-n</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"> N</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">, </code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">--number</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">=N</code><a href=\\\"https://docs.python.org/3/library/timeit.html#cmdoption-timeit-n\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">how many times to execute ‘statement’</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">-r</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"> N</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">, </code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">--repeat</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">=N</code><a href=\\\"https://docs.python.org/3/library/timeit.html#cmdoption-timeit-r\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\"></p></dd></dl></div></div>\\\n\\\n  \\\n</div></div></div></div></div></div></div><div style=\\\"font-size: 16px; display:block; min-width: 100%; position: relative;\\\"> <div><div style=\\\"background-color:white;\\\"><div><div><div><div><div>\\\n<span></span><h1 style=\\\"margin:0px;border:0px;padding:0.3em 0px;\\\"><a href=\\\"https://docs.python.org/3/library/trace.html#module-trace\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"trace: Trace or track Python statement execution.\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>trace</span></code></a> — Trace or track Python statement execution<a href=\\\"https://docs.python.org/3/library/trace.html#module-trace\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this headline\\\">¶</a></h1>\\\n<p style=\\\"line-height:140%;\\\"><strong>Source code:</strong> <a href=\\\"https://github.com/python/cpython/tree/3.7/Lib/trace.py\\\" style=\\\"color:rgb(0, 114, 170);\\\">Lib/trace.py</a></p>\\\n<hr style=\\\"border:0px;background-color:rgb(204, 204, 204);height:1px;\\\"/>\\\n<p style=\\\"line-height:140%;\\\">The <a href=\\\"https://docs.python.org/3/library/trace.html#module-trace\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"trace: Trace or track Python statement execution.\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>trace</span></code></a> module allows you to trace program execution, generate\\\nannotated statement coverage listings, print caller/callee relationships and\\\nlist functions executed during a program run.  It can be used in another program\\\nor from the command line.</p>\\\n<div style=\\\"border-radius:3px;border:1px solid rgb(221, 221, 102);\\\">\\\n<p style=\\\"line-height:140%;\\\">See also</p>\\\n<dl><dt><a href=\\\"https://coverage.readthedocs.io/\\\" style=\\\"color:rgb(0, 114, 170);\\\">Coverage.py</a></dt><dd><p style=\\\"line-height:140%;\\\">A popular third-party coverage tool that provides HTML\\\noutput along with advanced features such as branch coverage.</p>\\\n</dd></dl>\\\n</div>\\\n<div>\\\n<span></span><h2 style=\\\"margin:0px;border:0px;padding:0.3em 0px;\\\">Command-Line Usage<a href=\\\"https://docs.python.org/3/library/trace.html#command-line-usage\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this headline\\\">¶</a></h2>\\\n<p style=\\\"line-height:140%;\\\">The <a href=\\\"https://docs.python.org/3/library/trace.html#module-trace\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"trace: Trace or track Python statement execution.\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>trace</span></code></a> module can be invoked from the command line.  It can be as\\\nsimple as</p>\\\n<div style=\\\"position:relative;\\\"><div style=\\\"background:none;\\\"><pre style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;border:1px solid rgb(170, 204, 153);\\\"><span></span><span>python</span> <span style=\\\"color:rgb(102, 102, 102);\\\">-</span><span>m</span> <span>trace</span> <span style=\\\"color:rgb(102, 102, 102);\\\">--</span><span>count</span> <span style=\\\"color:rgb(102, 102, 102);\\\">-</span><span>C</span> <span style=\\\"color:rgb(102, 102, 102);\\\">.</span> <span>somefile</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>py</span> <span style=\\\"color:rgb(102, 102, 102);\\\">...</span>\\\n</pre></div>\\\n</div>\\\n<p style=\\\"line-height:140%;\\\">The above will execute <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>somefile.py</span></code> and generate annotated listings of\\\nall Python modules imported during the execution into the current directory.</p>\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">--help</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"></code><a href=\\\"https://docs.python.org/3/library/trace.html#cmdoption-trace-help\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Display usage and exit.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">--version</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"></code><a href=\\\"https://docs.python.org/3/library/trace.html#cmdoption-trace-version\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Display the version of the module and exit.</p>\\\n</dd></dl>\\\n\\\n<div>\\\n<h3 style=\\\"margin:0px;border:0px;padding:0.3em 0px;\\\">Main options<a href=\\\"https://docs.python.org/3/library/trace.html#main-options\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this headline\\\">¶</a></h3>\\\n<p style=\\\"line-height:140%;\\\">At least one of the following options must be specified when invoking\\\n<a href=\\\"https://docs.python.org/3/library/trace.html#module-trace\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"trace: Trace or track Python statement execution.\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>trace</span></code></a>.  The <a href=\\\"https://docs.python.org/3/library/trace.html#cmdoption-trace-l\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>--listfuncs</span></code></a> option is mutually exclusive with\\\nthe <a href=\\\"https://docs.python.org/3/library/trace.html#cmdoption-trace-t\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>--trace</span></code></a> and <a href=\\\"https://docs.python.org/3/library/trace.html#cmdoption-trace-c\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>--count</span></code></a> options. When\\\n<a href=\\\"https://docs.python.org/3/library/trace.html#cmdoption-trace-l\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>--listfuncs</span></code></a> is provided, neither <a href=\\\"https://docs.python.org/3/library/trace.html#cmdoption-trace-c\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>--count</span></code></a> nor\\\n<a href=\\\"https://docs.python.org/3/library/trace.html#cmdoption-trace-t\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>--trace</span></code></a> are accepted, and vice versa.</p>\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">-c</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"></code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">, </code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">--count</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"></code><a href=\\\"https://docs.python.org/3/library/trace.html#cmdoption-trace-c\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Produce a set of annotated listing files upon program completion that shows\\\nhow many times each statement was executed.  See also\\\n<a href=\\\"https://docs.python.org/3/library/trace.html#cmdoption-trace-coverdir\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>--coverdir</span></code></a>, <a href=\\\"https://docs.python.org/3/library/trace.html#cmdoption-trace-f\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>--file</span></code></a> and\\\n<a href=\\\"https://docs.python.org/3/library/trace.html#cmdoption-trace-no-report\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>--no-report</span></code></a> below.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">-t</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"></code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">, </code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">--trace</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"></code><a href=\\\"https://docs.python.org/3/library/trace.html#cmdoption-trace-t\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Display lines as they are executed.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">-l</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"></code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">, </code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">--listfuncs</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"></code><a href=\\\"https://docs.python.org/3/library/trace.html#cmdoption-trace-l\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Display the functions executed by running the program.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">-r</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"></code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">, </code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">--report</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"></code><a href=\\\"https://docs.python.org/3/library/trace.html#cmdoption-trace-r\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Produce an annotated list from an earlier program run that used the\\\n<a href=\\\"https://docs.python.org/3/library/trace.html#cmdoption-trace-c\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>--count</span></code></a> and <a href=\\\"https://docs.python.org/3/library/trace.html#cmdoption-trace-f\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>--file</span></code></a> option.  This does not\\\nexecute any code.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">-T</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"></code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">, </code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">--trackcalls</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"></code><a href=\\\"https://docs.python.org/3/library/trace.html#cmdoption-trace-trackcalls\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Display the calling relationships exposed by running the program.</p>\\\n</dd></dl>\\\n\\\n</div>\\\n<div>\\\n<h3 style=\\\"margin:0px;border:0px;padding:0.3em 0px;\\\">Modifiers<a href=\\\"https://docs.python.org/3/library/trace.html#modifiers\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this headline\\\">¶</a></h3>\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">-f</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"></code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">, </code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">--file</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">=&lt;file&gt;</code><a href=\\\"https://docs.python.org/3/library/trace.html#cmdoption-trace-f\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Name of a file to accumulate counts over several tracing runs.  Should be\\\nused with the <a href=\\\"https://docs.python.org/3/library/trace.html#cmdoption-trace-c\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>--count</span></code></a> option.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">-C</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"></code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">, </code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">--coverdir</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">=&lt;dir&gt;</code><a href=\\\"https://docs.python.org/3/library/trace.html#cmdoption-trace-coverdir\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Directory where the report files go.  The coverage report for\\\n<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>package.module</span></code> is written to file <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><em><span>dir</span></em><span>/</span><em><span>package</span></em><span>/</span><em><span>module</span></em><span>.cover</span></code>.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">-m</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"></code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">, </code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">--missing</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"></code><a href=\\\"https://docs.python.org/3/library/trace.html#cmdoption-trace-m\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">When generating annotated listings, mark lines which were not executed with\\\n<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>&gt;&gt;&gt;&gt;&gt;&gt;</span></code>.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">-s</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"></code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">, </code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">--summary</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"></code><a href=\\\"https://docs.python.org/3/library/trace.html#cmdoption-trace-s\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">When using <a href=\\\"https://docs.python.org/3/library/trace.html#cmdoption-trace-c\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>--count</span></code></a> or <a href=\\\"https://docs.python.org/3/library/trace.html#cmdoption-trace-r\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>--report</span></code></a>, write a brief\\\nsummary to stdout for each file processed.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">-R</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"></code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">, </code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">--no-report</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"></code><a href=\\\"https://docs.python.org/3/library/trace.html#cmdoption-trace-no-report\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Do not generate annotated listings.  This is useful if you intend to make\\\nseveral runs with <a href=\\\"https://docs.python.org/3/library/trace.html#cmdoption-trace-c\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>--count</span></code></a>, and then produce a single set of\\\nannotated listings at the end.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">-g</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"></code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">, </code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">--timing</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"></code><a href=\\\"https://docs.python.org/3/library/trace.html#cmdoption-trace-g\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Prefix each line with the time since the program started.  Only used while\\\ntracing.</p>\\\n</dd></dl>\\\n\\\n</div>\\\n<div>\\\n<h3 style=\\\"margin:0px;border:0px;padding:0.3em 0px;\\\">Filters<a href=\\\"https://docs.python.org/3/library/trace.html#filters\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this headline\\\">¶</a></h3>\\\n<p style=\\\"line-height:140%;\\\">These options may be repeated multiple times.</p>\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">--ignore-module</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">=&lt;mod&gt;</code><a href=\\\"https://docs.python.org/3/library/trace.html#cmdoption-trace-ignore-module\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Ignore each of the given module names and its submodules (if it is a\\\npackage).  The argument can be a list of names separated by a comma.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">--ignore-dir</code><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">=&lt;dir&gt;</code><a href=\\\"https://docs.python.org/3/library/trace.html#cmdoption-trace-ignore-dir\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Ignore all modules and packages in the named directory and subdirectories.\\\nThe argument can be a list of directories separated by <a href=\\\"https://docs.python.org/3/library/os.html#os.pathsep\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"os.pathsep\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>os.pathsep</span></code></a>.</p>\\\n</dd></dl>\\\n\\\n</div>\\\n</div>\\\n<div>\\\n<span></span><h2 style=\\\"margin:0px;border:0px;padding:0.3em 0px;\\\">Programmatic Interface<a href=\\\"https://docs.python.org/3/library/trace.html#programmatic-interface\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this headline\\\">¶</a></h2>\\\n<dl><dt>\\\n<em>class </em><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">trace.</code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">Trace</code><span>(</span><em>count=1</em>, <em>trace=1</em>, <em>countfuncs=0</em>, <em>countcallers=0</em>, <em>ignoremods=()</em>, <em>ignoredirs=()</em>, <em>infile=None</em>, <em>outfile=None</em>, <em>timing=False</em><span>)</span><a href=\\\"https://docs.python.org/3/library/trace.html#trace.Trace\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Create an object to trace execution of a single statement or expression.  All\\\nparameters are optional.  <em>count</em> enables counting of line numbers.  <em>trace</em>\\\nenables line execution tracing.  <em>countfuncs</em> enables listing of the\\\nfunctions called during the run.  <em>countcallers</em> enables call relationship\\\ntracking.  <em>ignoremods</em> is a list of modules or packages to ignore.\\\n<em>ignoredirs</em> is a list of directories whose modules or packages should be\\\nignored.  <em>infile</em> is the name of the file from which to read stored count\\\ninformation.  <em>outfile</em> is the name of the file in which to write updated\\\ncount information.  <em>timing</em> enables a timestamp relative to when tracing was\\\nstarted to be displayed.</p>\\\n<blockquote>\\\n<div><dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">run</code><span>(</span><em>cmd</em><span>)</span><a href=\\\"https://docs.python.org/3/library/trace.html#trace.Trace.run\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Execute the command and gather statistics from the execution with\\\nthe current tracing parameters.  <em>cmd</em> must be a string or code object,\\\nsuitable for passing into <a href=\\\"https://docs.python.org/3/library/functions.html#exec\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"exec\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>exec()</span></code></a>.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">runctx</code><span>(</span><em>cmd</em>, <em>globals=None</em>, <em>locals=None</em><span>)</span><a href=\\\"https://docs.python.org/3/library/trace.html#trace.Trace.runctx\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Execute the command and gather statistics from the execution with the\\\ncurrent tracing parameters, in the defined global and local\\\nenvironments.  If not defined, <em>globals</em> and <em>locals</em> default to empty\\\ndictionaries.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">runfunc</code><span>(</span><em>func</em>, <em>*args</em>, <em>**kwds</em><span>)</span><a href=\\\"https://docs.python.org/3/library/trace.html#trace.Trace.runfunc\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Call <em>func</em> with the given arguments under control of the <a href=\\\"https://docs.python.org/3/library/trace.html#trace.Trace\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"trace.Trace\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>Trace</span></code></a>\\\nobject with the current tracing parameters.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">results</code><span>(</span><span>)</span><a href=\\\"https://docs.python.org/3/library/trace.html#trace.Trace.results\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Return a <a href=\\\"https://docs.python.org/3/library/trace.html#trace.CoverageResults\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"trace.CoverageResults\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>CoverageResults</span></code></a> object that contains the cumulative\\\nresults of all previous calls to <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>run</span></code>, <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>runctx</span></code> and <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>runfunc</span></code>\\\nfor the given <a href=\\\"https://docs.python.org/3/library/trace.html#trace.Trace\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"trace.Trace\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>Trace</span></code></a> instance.  Does not reset the accumulated\\\ntrace results.</p>\\\n</dd></dl>\\\n\\\n</div></blockquote>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<em>class </em><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\">trace.</code><code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">CoverageResults</code><a href=\\\"https://docs.python.org/3/library/trace.html#trace.CoverageResults\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">A container for coverage results, created by <a href=\\\"https://docs.python.org/3/library/trace.html#trace.Trace.results\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"trace.Trace.results\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>Trace.results()</span></code></a>.  Should\\\nnot be created directly by the user.</p>\\\n<blockquote>\\\n<div><dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">update</code><span>(</span><em>other</em><span>)</span><a href=\\\"https://docs.python.org/3/library/trace.html#trace.CoverageResults.update\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Merge in data from another <a href=\\\"https://docs.python.org/3/library/trace.html#trace.CoverageResults\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"trace.CoverageResults\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>CoverageResults</span></code></a> object.</p>\\\n</dd></dl>\\\n\\\n<dl><dt>\\\n<code style=\\\"font-family:monospace, sans-serif;border-radius:3px;font-size:120%;\\\">write_results</code><span>(</span><em>show_missing=True</em>, <em>summary=False</em>, <em>coverdir=None</em><span>)</span><a href=\\\"https://docs.python.org/3/library/trace.html#trace.CoverageResults.write_results\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this definition\\\">¶</a></dt><dd><p style=\\\"line-height:140%;\\\">Write coverage results.  Set <em>show_missing</em> to show lines that had no\\\nhits.  Set <em>summary</em> to include in the output the coverage summary per\\\nmodule.  <em>coverdir</em> specifies the directory into which the coverage\\\nresult files will be output.  If <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>None</span></code>, the results for each source\\\nfile are placed in its directory.</p>\\\n</dd></dl>\\\n\\\n</div></blockquote>\\\n</dd></dl>\\\n\\\n<p style=\\\"line-height:140%;\\\">A simple example demonstrating the use of the programmatic interface:</p>\\\n<div style=\\\"position:relative;\\\"><div style=\\\"background:none;\\\"><pre style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;border:1px solid rgb(170, 204, 153);\\\"><span></span><span style=\\\"color:rgb(0, 112, 32);font-weight:bold;\\\">import</span> <span style=\\\"color:rgb(14, 132, 181);font-weight:bold;\\\">sys</span>\\\n<span style=\\\"color:rgb(0, 112, 32);font-weight:bold;\\\">import</span> <span style=\\\"color:rgb(14, 132, 181);font-weight:bold;\\\">trace</span>\\\n\\\n<span style=\\\"color:rgb(64, 128, 144);font-style:italic;\\\"># create a Trace object, telling it what to ignore, and whether to</span>\\\n<span style=\\\"color:rgb(64, 128, 144);font-style:italic;\\\"># do tracing or line-counting or both.</span>\\\n<span>tracer</span> <span style=\\\"color:rgb(102, 102, 102);\\\">=</span> <span>trace</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>Trace</span><span>(</span>\\\n    <span>ignoredirs</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span>[</span><span>sys</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>prefix</span><span>,</span> <span>sys</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>exec_prefix</span><span>],</span>\\\n    <span>trace</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">0</span><span>,</span>\\\n    <span>count</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">1</span><span>)</span>\\\n\\\n<span style=\\\"color:rgb(64, 128, 144);font-style:italic;\\\"># run the new command using the given tracer</span>\\\n<span>tracer</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>run</span><span>(</span><span style=\\\"color:rgb(64, 112, 160);\\\">'main()'</span><span>)</span>\\\n\\\n<span style=\\\"color:rgb(64, 128, 144);font-style:italic;\\\"># make a report, placing output in the current directory</span>\\\n<span>r</span> <span style=\\\"color:rgb(102, 102, 102);\\\">=</span> <span>tracer</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>results</span><span>()</span>\\\n<span>r</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>write_results</span><span>(</span><span>show_missing</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(0, 112, 32);font-weight:bold;\\\">True</span><span>,</span> <span>coverdir</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(64, 112, 160);\\\">&quot;.&quot;</span><span>)</span>\\\n</pre></div>\\\n</div>\\\n</div>\\\n</div></div></div></div></div></div></div></div><div style=\\\"font-size: 16px; display:block; min-width: 100%; position: relative;\\\"> <div><div style=\\\"background-color:white;\\\"><div><div><div><div><div><div>\\\n<h2 style=\\\"margin:0px;border:0px;padding:0.3em 0px;\\\">Examples<a href=\\\"https://docs.python.org/3/library/tracemalloc.html#examples\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this headline\\\">¶</a></h2>\\\n<div>\\\n<h3 style=\\\"margin:0px;border:0px;padding:0.3em 0px;\\\">Display the top 10<a href=\\\"https://docs.python.org/3/library/tracemalloc.html#display-the-top-10\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this headline\\\">¶</a></h3>\\\n<p style=\\\"line-height:140%;\\\">Display the 10 files allocating the most memory:</p>\\\n<div style=\\\"position:relative;\\\"><div style=\\\"background:none;\\\"><pre style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;border:1px solid rgb(170, 204, 153);\\\"><span></span><span style=\\\"color:rgb(0, 112, 32);font-weight:bold;\\\">import</span> <span style=\\\"color:rgb(14, 132, 181);font-weight:bold;\\\">tracemalloc</span>\\\n\\\n<span>tracemalloc</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>start</span><span>()</span>\\\n\\\n<span style=\\\"color:rgb(64, 128, 144);font-style:italic;\\\"># ... run your application ...</span>\\\n\\\n<span>snapshot</span> <span style=\\\"color:rgb(102, 102, 102);\\\">=</span> <span>tracemalloc</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>take_snapshot</span><span>()</span>\\\n<span>top_stats</span> <span style=\\\"color:rgb(102, 102, 102);\\\">=</span> <span>snapshot</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>statistics</span><span>(</span><span style=\\\"color:rgb(64, 112, 160);\\\">'lineno'</span><span>)</span>\\\n\\\n<span style=\\\"color:rgb(0, 112, 32);\\\">print</span><span>(</span><span style=\\\"color:rgb(64, 112, 160);\\\">&quot;[ Top 10 ]&quot;</span><span>)</span>\\\n<span style=\\\"color:rgb(0, 112, 32);font-weight:bold;\\\">for</span> <span>stat</span> <span style=\\\"color:rgb(0, 112, 32);font-weight:bold;\\\">in</span> <span>top_stats</span><span>[:</span><span style=\\\"color:rgb(32, 128, 80);\\\">10</span><span>]:</span>\\\n    <span style=\\\"color:rgb(0, 112, 32);\\\">print</span><span>(</span><span>stat</span><span>)</span>\\\n</pre></div>\\\n</div>\\\n<p style=\\\"line-height:140%;\\\">Example of output of the Python test suite:</p>\\\n<div style=\\\"position:relative;\\\"><div style=\\\"background:none;\\\"><pre style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;border:1px solid rgb(170, 204, 153);\\\"><span></span><span>[</span> <span>Top</span> <span style=\\\"color:rgb(32, 128, 80);\\\">10</span> <span>]</span>\\\n<span style=\\\"color:rgb(102, 102, 102);\\\">&lt;</span><span>frozen</span> <span>importlib</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>_bootstrap</span><span style=\\\"color:rgb(102, 102, 102);\\\">&gt;</span><span>:</span><span style=\\\"color:rgb(32, 128, 80);\\\">716</span><span>:</span> <span>size</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">4855</span> <span>KiB</span><span>,</span> <span>count</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">39328</span><span>,</span> <span>average</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">126</span> <span>B</span>\\\n<span style=\\\"color:rgb(102, 102, 102);\\\">&lt;</span><span>frozen</span> <span>importlib</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>_bootstrap</span><span style=\\\"color:rgb(102, 102, 102);\\\">&gt;</span><span>:</span><span style=\\\"color:rgb(32, 128, 80);\\\">284</span><span>:</span> <span>size</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">521</span> <span>KiB</span><span>,</span> <span>count</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">3199</span><span>,</span> <span>average</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">167</span> <span>B</span>\\\n<span style=\\\"color:rgb(102, 102, 102);\\\">/</span><span>usr</span><span style=\\\"color:rgb(102, 102, 102);\\\">/</span><span>lib</span><span style=\\\"color:rgb(102, 102, 102);\\\">/</span><span>python3</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span style=\\\"color:rgb(32, 128, 80);\\\">4</span><span style=\\\"color:rgb(102, 102, 102);\\\">/</span><span>collections</span><span style=\\\"color:rgb(102, 102, 102);\\\">/</span><span style=\\\"color:rgb(6, 40, 126);\\\">__init__</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>py</span><span>:</span><span style=\\\"color:rgb(32, 128, 80);\\\">368</span><span>:</span> <span>size</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">244</span> <span>KiB</span><span>,</span> <span>count</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">2315</span><span>,</span> <span>average</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">108</span> <span>B</span>\\\n<span style=\\\"color:rgb(102, 102, 102);\\\">/</span><span>usr</span><span style=\\\"color:rgb(102, 102, 102);\\\">/</span><span>lib</span><span style=\\\"color:rgb(102, 102, 102);\\\">/</span><span>python3</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span style=\\\"color:rgb(32, 128, 80);\\\">4</span><span style=\\\"color:rgb(102, 102, 102);\\\">/</span><span>unittest</span><span style=\\\"color:rgb(102, 102, 102);\\\">/</span><span>case</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>py</span><span>:</span><span style=\\\"color:rgb(32, 128, 80);\\\">381</span><span>:</span> <span>size</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">185</span> <span>KiB</span><span>,</span> <span>count</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">779</span><span>,</span> <span>average</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">243</span> <span>B</span>\\\n<span style=\\\"color:rgb(102, 102, 102);\\\">/</span><span>usr</span><span style=\\\"color:rgb(102, 102, 102);\\\">/</span><span>lib</span><span style=\\\"color:rgb(102, 102, 102);\\\">/</span><span>python3</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span style=\\\"color:rgb(32, 128, 80);\\\">4</span><span style=\\\"color:rgb(102, 102, 102);\\\">/</span><span>unittest</span><span style=\\\"color:rgb(102, 102, 102);\\\">/</span><span>case</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>py</span><span>:</span><span style=\\\"color:rgb(32, 128, 80);\\\">402</span><span>:</span> <span>size</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">154</span> <span>KiB</span><span>,</span> <span>count</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">378</span><span>,</span> <span>average</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">416</span> <span>B</span>\\\n<span style=\\\"color:rgb(102, 102, 102);\\\">/</span><span>usr</span><span style=\\\"color:rgb(102, 102, 102);\\\">/</span><span>lib</span><span style=\\\"color:rgb(102, 102, 102);\\\">/</span><span>python3</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span style=\\\"color:rgb(32, 128, 80);\\\">4</span><span style=\\\"color:rgb(102, 102, 102);\\\">/</span><span>abc</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>py</span><span>:</span><span style=\\\"color:rgb(32, 128, 80);\\\">133</span><span>:</span> <span>size</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">88.7</span> <span>KiB</span><span>,</span> <span>count</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">347</span><span>,</span> <span>average</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">262</span> <span>B</span>\\\n<span style=\\\"color:rgb(102, 102, 102);\\\">&lt;</span><span>frozen</span> <span>importlib</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>_bootstrap</span><span style=\\\"color:rgb(102, 102, 102);\\\">&gt;</span><span>:</span><span style=\\\"color:rgb(32, 128, 80);\\\">1446</span><span>:</span> <span>size</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">70.4</span> <span>KiB</span><span>,</span> <span>count</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">911</span><span>,</span> <span>average</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">79</span> <span>B</span>\\\n<span style=\\\"color:rgb(102, 102, 102);\\\">&lt;</span><span>frozen</span> <span>importlib</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>_bootstrap</span><span style=\\\"color:rgb(102, 102, 102);\\\">&gt;</span><span>:</span><span style=\\\"color:rgb(32, 128, 80);\\\">1454</span><span>:</span> <span>size</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">52.0</span> <span>KiB</span><span>,</span> <span>count</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">25</span><span>,</span> <span>average</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">2131</span> <span>B</span>\\\n<span style=\\\"color:rgb(102, 102, 102);\\\">&lt;</span><span>string</span><span style=\\\"color:rgb(102, 102, 102);\\\">&gt;</span><span>:</span><span style=\\\"color:rgb(32, 128, 80);\\\">5</span><span>:</span> <span>size</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">49.7</span> <span>KiB</span><span>,</span> <span>count</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">148</span><span>,</span> <span>average</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">344</span> <span>B</span>\\\n<span style=\\\"color:rgb(102, 102, 102);\\\">/</span><span>usr</span><span style=\\\"color:rgb(102, 102, 102);\\\">/</span><span>lib</span><span style=\\\"color:rgb(102, 102, 102);\\\">/</span><span>python3</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span style=\\\"color:rgb(32, 128, 80);\\\">4</span><span style=\\\"color:rgb(102, 102, 102);\\\">/</span><span>sysconfig</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>py</span><span>:</span><span style=\\\"color:rgb(32, 128, 80);\\\">411</span><span>:</span> <span>size</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">48.0</span> <span>KiB</span><span>,</span> <span>count</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">1</span><span>,</span> <span>average</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">48.0</span> <span>KiB</span>\\\n</pre></div>\\\n</div>\\\n<p style=\\\"line-height:140%;\\\">We can see that Python loaded <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>4855</span> <span>KiB</span></code> data (bytecode and constants) from\\\nmodules and that the <a href=\\\"https://docs.python.org/3/library/collections.html#module-collections\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"collections: Container datatypes\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>collections</span></code></a> module allocated <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>244</span> <span>KiB</span></code> to build\\\n<a href=\\\"https://docs.python.org/3/library/collections.html#collections.namedtuple\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"collections.namedtuple\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>namedtuple</span></code></a> types.</p>\\\n<p style=\\\"line-height:140%;\\\">See <a href=\\\"https://docs.python.org/3/library/tracemalloc.html#tracemalloc.Snapshot.statistics\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"tracemalloc.Snapshot.statistics\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>Snapshot.statistics()</span></code></a> for more options.</p>\\\n</div>\\\n<div>\\\n<h3 style=\\\"margin:0px;border:0px;padding:0.3em 0px;\\\">Compute differences<a href=\\\"https://docs.python.org/3/library/tracemalloc.html#compute-differences\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this headline\\\">¶</a></h3>\\\n<p style=\\\"line-height:140%;\\\">Take two snapshots and display the differences:</p>\\\n<div style=\\\"position:relative;\\\"><div style=\\\"background:none;\\\"><pre style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;border:1px solid rgb(170, 204, 153);\\\"><span></span><span style=\\\"color:rgb(0, 112, 32);font-weight:bold;\\\">import</span> <span style=\\\"color:rgb(14, 132, 181);font-weight:bold;\\\">tracemalloc</span>\\\n<span>tracemalloc</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>start</span><span>()</span>\\\n<span style=\\\"color:rgb(64, 128, 144);font-style:italic;\\\"># ... start your application ...</span>\\\n\\\n<span>snapshot1</span> <span style=\\\"color:rgb(102, 102, 102);\\\">=</span> <span>tracemalloc</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>take_snapshot</span><span>()</span>\\\n<span style=\\\"color:rgb(64, 128, 144);font-style:italic;\\\"># ... call the function leaking memory ...</span>\\\n<span>snapshot2</span> <span style=\\\"color:rgb(102, 102, 102);\\\">=</span> <span>tracemalloc</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>take_snapshot</span><span>()</span>\\\n\\\n<span>top_stats</span> <span style=\\\"color:rgb(102, 102, 102);\\\">=</span> <span>snapshot2</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>compare_to</span><span>(</span><span>snapshot1</span><span>,</span> <span style=\\\"color:rgb(64, 112, 160);\\\">'lineno'</span><span>)</span>\\\n\\\n<span style=\\\"color:rgb(0, 112, 32);\\\">print</span><span>(</span><span style=\\\"color:rgb(64, 112, 160);\\\">&quot;[ Top 10 differences ]&quot;</span><span>)</span>\\\n<span style=\\\"color:rgb(0, 112, 32);font-weight:bold;\\\">for</span> <span>stat</span> <span style=\\\"color:rgb(0, 112, 32);font-weight:bold;\\\">in</span> <span>top_stats</span><span>[:</span><span style=\\\"color:rgb(32, 128, 80);\\\">10</span><span>]:</span>\\\n    <span style=\\\"color:rgb(0, 112, 32);\\\">print</span><span>(</span><span>stat</span><span>)</span>\\\n</pre></div>\\\n</div>\\\n<p style=\\\"line-height:140%;\\\">Example of output before/after running some tests of the Python test suite:</p>\\\n<div style=\\\"position:relative;\\\"><div style=\\\"background:none;\\\"><pre style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;border:1px solid rgb(170, 204, 153);\\\"><span></span><span>[</span> <span>Top</span> <span style=\\\"color:rgb(32, 128, 80);\\\">10</span> <span>differences</span> <span>]</span>\\\n<span style=\\\"color:rgb(102, 102, 102);\\\">&lt;</span><span>frozen</span> <span>importlib</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>_bootstrap</span><span style=\\\"color:rgb(102, 102, 102);\\\">&gt;</span><span>:</span><span style=\\\"color:rgb(32, 128, 80);\\\">716</span><span>:</span> <span>size</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">8173</span> <span>KiB</span> <span>(</span><span style=\\\"color:rgb(102, 102, 102);\\\">+</span><span style=\\\"color:rgb(32, 128, 80);\\\">4428</span> <span>KiB</span><span>),</span> <span>count</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">71332</span> <span>(</span><span style=\\\"color:rgb(102, 102, 102);\\\">+</span><span style=\\\"color:rgb(32, 128, 80);\\\">39369</span><span>),</span> <span>average</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">117</span> <span>B</span>\\\n<span style=\\\"color:rgb(102, 102, 102);\\\">/</span><span>usr</span><span style=\\\"color:rgb(102, 102, 102);\\\">/</span><span>lib</span><span style=\\\"color:rgb(102, 102, 102);\\\">/</span><span>python3</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span style=\\\"color:rgb(32, 128, 80);\\\">4</span><span style=\\\"color:rgb(102, 102, 102);\\\">/</span><span>linecache</span><span style=\\\"color:rgb(102, 102, 102);\\\">.</span><span>py</span><span>:</span><span style=\\\"color:rgb(32, 128, 80);\\\">127</span><span>:</span> <span>size</span><span style=\\\"color:rgb(102, 102, 102);\\\">=</span><span style=\\\"color:rgb(32, 128, 80);\\\">940</span> <span>KiB</span> <span>(</span><span style=\\\"color:rgb(102, 102, 102);\\\"></span></pre></div></div></div></div>\\\n\\\n  \\\n</div></div></div></div></div></div></div></div><div style=\\\"font-size: 16px; display:block; min-width: 100%; position: relative;\\\"> <div><div style=\\\"background-color:white;\\\">  \\\n    <div style=\\\"margin-bottom:1.2em;padding:0.5em 0px;margin-top:0.5em;border-bottom:1px solid rgb(204, 204, 204);border-top:0px;\\\">\\\n      \\\n      <ul>\\\n        <li style=\\\"margin-right:10px;\\\">\\\n          <a href=\\\"https://docs.python.org/3/genindex.html\\\" title=\\\"General Index\\\">index</a></li>\\\n        <li>\\\n          <a href=\\\"https://docs.python.org/3/py-modindex.html\\\" title=\\\"Python Module Index\\\">modules</a> |</li>\\\n        <li>\\\n          <a href=\\\"https://docs.python.org/3/library/distutils.html\\\" title=\\\"distutils — Building and installing Python modules\\\">next</a> |</li>\\\n        <li>\\\n          <a href=\\\"https://docs.python.org/3/library/tracemalloc.html\\\" title=\\\"tracemalloc — Trace memory allocations\\\">previous</a> |</li>\\\n        <li><img src=\\\":/75c8b1deb08a456da275578271a5edef\\\" type=\\\"image/png\\\" data-filename=\\\"Image.png\\\" height=\\\"16\\\" style=\\\"vertical-align:middle;margin-top:-1px;\\\" width=\\\"16\\\"/></li>\\\n        <li><a href=\\\"https://www.python.org/\\\">Python</a> »</li>\\\n        <li>\\\n          <span></span>\\\n          <span></span>\\\n          <a href=\\\"https://docs.python.org/3/index.html\\\">Documentation </a> »\\\n        </li>\\\n\\\n          <li><a href=\\\"https://docs.python.org/3/library/index.html\\\">The Python Standard Library</a> »</li>\\\n    <li>\\\n        \\\n\\\n    <div style=\\\"display:inline;\\\">\\\n        <div style=\\\"display:inline;\\\">\\\n          \\\n          \\\n          \\\n          \\\n        </div>\\\n    </div>\\\n    \\\n         |\\\n    </li>\\\n\\\n      </ul>\\\n    </div>    \\\n\\\n    <div>\\\n      <div>\\\n        <div>\\\n          <div style=\\\"padding:0px 0px 0px 1.2em;\\\">\\\n            \\\n  <div>\\\n<h1 style=\\\"margin:0px;border:0px;padding:0.3em 0px;\\\">Software Packaging and Distribution<a href=\\\"https://docs.python.org/3/library/distribution.html#software-packaging-and-distribution\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this headline\\\">¶</a></h1>\\\n<p style=\\\"line-height:140%;\\\">These libraries help you with publishing and installing Python software.\\\nWhile these modules are designed to work in conjunction with the\\\n<a href=\\\"https://pypi.org/\\\" style=\\\"color:rgb(0, 114, 170);\\\">Python Package Index</a>, they can also be used\\\nwith a local index server, or without any index server at all.</p>\\\n<div>\\\n<ul>\\\n<li><a href=\\\"https://docs.python.org/3/library/distutils.html\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>distutils</span></code> — Building and installing Python modules</a></li>\\\n<li><a href=\\\"https://docs.python.org/3/library/ensurepip.html\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>ensurepip</span></code> — Bootstrapping the <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>pip</span></code> installer</a><ul>\\\n<li><a href=\\\"https://docs.python.org/3/library/ensurepip.html#command-line-interface\\\" style=\\\"color:rgb(0, 114, 170);\\\">Command line interface</a></li>\\\n<li><a href=\\\"https://docs.python.org/3/library/ensurepip.html#module-api\\\" style=\\\"color:rgb(0, 114, 170);\\\">Module API</a></li>\\\n</ul>\\\n</li>\\\n<li><a href=\\\"https://docs.python.org/3/library/venv.html\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>venv</span></code> — Creation of virtual environments</a><ul>\\\n<li><a href=\\\"https://docs.python.org/3/library/venv.html#creating-virtual-environments\\\" style=\\\"color:rgb(0, 114, 170);\\\">Creating virtual environments</a></li>\\\n<li><a href=\\\"https://docs.python.org/3/library/venv.html#api\\\" style=\\\"color:rgb(0, 114, 170);\\\">API</a></li>\\\n<li><a href=\\\"https://docs.python.org/3/library/venv.html#an-example-of-extending-envbuilder\\\" style=\\\"color:rgb(0, 114, 170);\\\">An example of extending <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>EnvBuilder</span></code></a></li>\\\n</ul>\\\n</li>\\\n<li><a href=\\\"https://docs.python.org/3/library/zipapp.html\\\" style=\\\"color:rgb(0, 114, 170);\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>zipapp</span></code> — Manage executable Python zip archives</a><ul>\\\n<li><a href=\\\"https://docs.python.org/3/library/zipapp.html#basic-example\\\" style=\\\"color:rgb(0, 114, 170);\\\">Basic Example</a></li>\\\n<li><a href=\\\"https://docs.python.org/3/library/zipapp.html#command-line-interface\\\" style=\\\"color:rgb(0, 114, 170);\\\">Command-Line Interface</a></li>\\\n<li><a href=\\\"https://docs.python.org/3/library/zipapp.html#python-api\\\" style=\\\"color:rgb(0, 114, 170);\\\">Python API</a></li>\\\n<li><a href=\\\"https://docs.python.org/3/library/zipapp.html#examples\\\" style=\\\"color:rgb(0, 114, 170);\\\">Examples</a></li>\\\n<li><a href=\\\"https://docs.python.org/3/library/zipapp.html#specifying-the-interpreter\\\" style=\\\"color:rgb(0, 114, 170);\\\">Specifying the Interpreter</a></li>\\\n<li><a href=\\\"https://docs.python.org/3/library/zipapp.html#creating-standalone-applications-with-zipapp\\\" style=\\\"color:rgb(0, 114, 170);\\\">Creating Standalone Applications with zipapp</a><ul>\\\n<li><a href=\\\"https://docs.python.org/3/library/zipapp.html#making-a-windows-executable\\\" style=\\\"color:rgb(0, 114, 170);\\\">Making a Windows executable</a></li>\\\n<li><a href=\\\"https://docs.python.org/3/library/zipapp.html#caveats\\\" style=\\\"color:rgb(0, 114, 170);\\\">Caveats</a></li>\\\n</ul>\\\n</li>\\\n<li><a href=\\\"https://docs.python.org/3/library/zipapp.html#the-python-zip-application-archive-format\\\" style=\\\"color:rgb(0, 114, 170);\\\">The Python Zip Application Archive Format</a></li>\\\n</ul>\\\n</li>\\\n</ul>\\\n</div>\\\n</div>\\\n\\\n\\\n          </div>\\\n        </div>\\\n      </div>\\\n      <div style=\\\"background-color:rgb(238, 238, 238);border-radius:5px;line-height:130%;font-size:smaller;\\\">\\\n        <div style=\\\"float:left;margin-right:0px;width:202px;\\\">\\\n  <h4 style=\\\"margin-top:1.5em;\\\">Previous topic</h4>\\\n  <p><a href=\\\"https://docs.python.org/3/library/tracemalloc.html\\\" title=\\\"previous chapter\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;\\\"><span>tracemalloc</span></code> — Trace memory allocations</a></p>\\\n  <h4 style=\\\"margin-top:1.5em;\\\">Next topic</h4>\\\n  <p><a href=\\\"https://docs.python.org/3/library/distutils.html\\\" title=\\\"next chapter\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;\\\"><span>distutils</span></code> — Building and installing Python modules</a></p>\\\n  <div>\\\n    <h3 style=\\\"margin-top:1.5em;\\\">This Page</h3>\\\n    <ul>\\\n      <li><a href=\\\"https://docs.python.org/3/bugs.html\\\">Report a Bug</a></li>\\\n      <li>\\\n        <a href=\\\"https://github.com/python/cpython/blob/3.7/Doc/library/distribution.rst\\\" rel=\\\"nofollow\\\">Show Source\\\n        </a>\\\n      </li>\\\n    </ul>\\\n  </div>\\\n        </div>\\\n      <div style=\\\"border-radius:0px 5px 5px 0px;color:rgb(68, 68, 68);background-color:rgb(204, 204, 204);font-size:1.2em;cursor:pointer;height:525.854px;padding-top:1px;padding-left:1px;margin-left:218px;\\\" title=\\\"Collapse sidebar\\\"></div></div>\\\n      <div></div>\\\n    </div>  \\\n    <div style=\\\"margin-bottom:1.2em;padding:0.5em 0px;border-top:1px solid rgb(204, 204, 204);margin-top:0.5em;\\\">\\\n      \\\n      <ul>\\\n        <li style=\\\"margin-right:10px;\\\">\\\n          <a href=\\\"https://docs.python.org/3/genindex.html\\\" title=\\\"General Index\\\">index</a></li>\\\n        <li>\\\n          <a href=\\\"https://docs.python.org/3/py-modindex.html\\\" title=\\\"Python Module Index\\\">modules</a> |</li>\\\n        <li>\\\n          <a href=\\\"https://docs.python.org/3/library/distutils.html\\\" title=\\\"distutils — Building and installing Python modules\\\">next</a> |</li>\\\n        <li>\\\n          <a href=\\\"https://docs.python.org/3/library/tracemalloc.html\\\" title=\\\"tracemalloc — Trace memory allocations\\\">previous</a> |</li>\\\n        <li><img src=\\\":/51419d7188b741f1ae4d5711bc44d6ec\\\" type=\\\"image/png\\\" data-filename=\\\"Image.png\\\" height=\\\"16\\\" style=\\\"vertical-align:middle;margin-top:-1px;\\\" width=\\\"16\\\"/></li>\\\n        <li><a href=\\\"https://www.python.org/\\\">Python</a> »</li>\\\n        <li>\\\n          <span></span>\\\n          <span></span>\\\n          <a href=\\\"https://docs.python.org/3/index.html\\\">Documentation </a> »\\\n        </li>\\\n\\\n          <li><a href=\\\"https://docs.python.org/3/library/index.html\\\">The Python Standard Library</a> »</li>\\\n    <li>\\\n        \\\n\\\n    <div style=\\\"display:inline;\\\">\\\n        <div style=\\\"display:inline;\\\">\\\n          \\\n          \\\n          \\\n          \\\n        </div>\\\n    </div>\\\n    \\\n         |\\\n    </li>\\\n\\\n      </ul>\\\n    </div>  \\\n    <div style=\\\"line-height:150%;margin-top:-2em;text-align:right;width:auto;margin-right:10px;\\\">\\\n    © <a href=\\\"https://docs.python.org/3/copyright.html\\\">Copyright</a> 2001-2019, Python Software Foundation.\\\n    <br/>\\\n    The Python Software Foundation is a non-profit corporation.\\\n    <a href=\\\"https://www.python.org/psf/donations/\\\">Please donate.</a>\\\n    <br/>\\\n    Last updated on Jun 03, 2019.\\\n    <a href=\\\"https://docs.python.org/3/bugs.html\\\">Found a bug</a>?\\\n    <br/>\\\n    Created using <a href=\\\"http://sphinx.pocoo.org/\\\">Sphinx</a> 2.0.1.\\\n    </div>\\\n\\\n  \\\n</div></div></div><div style=\\\"font-size: 16px; display:block; min-width: 100%; position: relative;\\\"> <div><div style=\\\"background-color:white;\\\"><div><div><div><div><div>\\\n<span></span><h1 style=\\\"margin:0px;border:0px;padding:0.3em 0px;\\\"><a href=\\\"https://docs.python.org/3/library/distutils.html#module-distutils\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"distutils: Support for building and installing Python modules into an existing Python installation.\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>distutils</span></code></a> — Building and installing Python modules<a href=\\\"https://docs.python.org/3/library/distutils.html#module-distutils\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"Permalink to this headline\\\">¶</a></h1>\\\n<hr style=\\\"border:0px;background-color:rgb(204, 204, 204);height:1px;\\\"/>\\\n<p style=\\\"line-height:140%;\\\">The <a href=\\\"https://docs.python.org/3/library/distutils.html#module-distutils\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"distutils: Support for building and installing Python modules into an existing Python installation.\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>distutils</span></code></a> package provides support for building and installing\\\nadditional modules into a Python installation.  The new modules may be either\\\n100%-pure Python, or may be extension modules written in C, or may be\\\ncollections of Python packages which include modules coded in both Python and C.</p>\\\n<p style=\\\"line-height:140%;\\\">Most Python users will <em>not</em> want to use this module directly, but instead\\\nuse the cross-version tools maintained by the Python Packaging Authority. In\\\nparticular,\\\n<a href=\\\"https://setuptools.readthedocs.io/en/latest/\\\" style=\\\"color:rgb(0, 114, 170);\\\">setuptools</a> is an\\\nenhanced alternative to <a href=\\\"https://docs.python.org/3/library/distutils.html#module-distutils\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"distutils: Support for building and installing Python modules into an existing Python installation.\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>distutils</span></code></a> that provides:</p>\\\n<ul>\\\n<li><p style=\\\"line-height:140%;\\\">support for declaring project dependencies</p></li>\\\n<li><p style=\\\"line-height:140%;\\\">additional mechanisms for configuring which files to include in source\\\nreleases (including plugins for integration with version control systems)</p></li>\\\n<li><p style=\\\"line-height:140%;\\\">the ability to declare project “entry points”, which can be used as the\\\nbasis for application plugin systems</p></li>\\\n<li><p style=\\\"line-height:140%;\\\">the ability to automatically generate Windows command line executables at\\\ninstallation time rather than needing to prebuild them</p></li>\\\n<li><p style=\\\"line-height:140%;\\\">consistent behaviour across all supported Python versions</p></li>\\\n</ul>\\\n<p style=\\\"line-height:140%;\\\">The recommended <a href=\\\"https://pip.pypa.io/\\\" style=\\\"color:rgb(0, 114, 170);\\\">pip</a> installer runs all\\\n<code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>setup.py</span></code> scripts with <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>setuptools</span></code>, even if the script itself only\\\nimports <code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;\\\"><span>distutils</span></code>. Refer to the\\\n<a href=\\\"https://packaging.python.org/\\\" style=\\\"color:rgb(0, 114, 170);\\\">Python Packaging User Guide</a> for more\\\ninformation.</p>\\\n<p style=\\\"line-height:140%;\\\">For the benefits of packaging tool authors and users seeking a deeper\\\nunderstanding of the details of the current packaging and distribution\\\nsystem, the legacy <a href=\\\"https://docs.python.org/3/library/distutils.html#module-distutils\\\" style=\\\"color:rgb(0, 114, 170);\\\" title=\\\"distutils: Support for building and installing Python modules into an existing Python installation.\\\"><code style=\\\"font-family:monospace, sans-serif;font-size:96.5%;border-radius:3px;font-weight:normal;\\\"><span>distutils</span></code></a> based user documentation and API\\\nreference remain available:</p>\\\n<ul>\\\n<li><p style=\\\"line-height:140%;\\\"><a href=\\\"https://docs.python.org/3/install/index.html#install-index\\\" style=\\\"color:rgb(0, 114, 170);\\\"><span>Installing Python Modules (Legacy version)</span></a></p></li>\\\n<li><p style=\\\"line-height:140%;\\\"><a href=\\\"https://docs.python.org/3/distutils/index.html#distutils-index\\\" style=\\\"color:rgb(0, 114, 170);\\\"><span>Distributing Python Modules (Legacy version)</span></a></p></li>\\\n</ul>\\\n</div></div></div></div></div></div></div></div>\\\n</div>\\\n</span>\\\n</div></body></html>\\u0000\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":173694}]"
metadata_diff: {"new":{"id":"152471945fd64b45b081b138d834d9f5","parent_id":"061de1401cfc4cfaadf6e74e015970e9","latitude":"0.00000000","longitude":"0.00000000","altitude":"0.0000","author":"","source_url":"","is_todo":0,"todo_due":0,"todo_completed":0,"source":"joplin-desktop","source_application":"net.cozic.joplin-desktop","application_data":"","order":1764345787353,"markup_language":2,"is_shared":0,"share_id":"","conflict_original_id":"","master_key_id":"","user_data":"","deleted_time":0},"deleted":[]}
encryption_cipher_text: 
encryption_applied: 0
updated_time: 2025-11-28T16:20:16.250Z
created_time: 2025-11-28T16:20:16.250Z
type_: 13