snipt

Ctrl+h for KB shortcuts

Bash

Disassembler for Python bytecode

1
2
3
4
5
6
$ python -m dis test.py 
  1           0 LOAD_CONST               0 ('Hello world')
              3 PRINT_ITEM          
              4 PRINT_NEWLINE       
              5 LOAD_CONST               1 (None)
              8 RETURN_VALUE        
https://snippets.siftie.com/embed/df6e3b37133eb022c48e421227a19f7e/
/raw/df6e3b37133eb022c48e421227a19f7e/
df6e3b37133eb022c48e421227a19f7e
bash
Bash
7
2019-04-14T01:12:23
True
False
False
/api/public/snipt/6881/
disassembler-for-python-bytecode
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>$ python -m dis test.py </span><span id="L-2"><a name="L-2"></a> <span class="m">1</span> <span class="m">0</span> LOAD_CONST <span class="m">0</span> <span class="o">(</span><span class="s1">&#39;Hello world&#39;</span><span class="o">)</span> </span><span id="L-3"><a name="L-3"></a> <span class="m">3</span> PRINT_ITEM </span><span id="L-4"><a name="L-4"></a> <span class="m">4</span> PRINT_NEWLINE </span><span id="L-5"><a name="L-5"></a> <span class="m">5</span> LOAD_CONST <span class="m">1</span> <span class="o">(</span>None<span class="o">)</span> </span><span id="L-6"><a name="L-6"></a> <span class="m">8</span> RETURN_VALUE </span></pre></div> </td></tr></table>
bytecode, disassembler, profiling, python