flâneur

Python Bytecode and AST Explorer • Kuter Dinel's blog

kuterdinel.com · 147 words · saved by 1 readers

I made a Python bytecode & AST (Abstract Syntaxt Tree) explorer, it's similar to Godbolt Compiler Explorer. Also all the parsing and bytecode compilation is done on browser using Pyodide! Paste or type your code to the left side and you are going to be able to view the AST or bytecode on the right side.

I made a Python bytecode & AST (Abstract Syntaxt Tree) explorer, it's similar to Godbolt Compiler Explorer. Also all the parsing and bytecode compilation is done on browser using Pyodide! Paste or type your code to the left side and you are going to be able to view the AST or bytecode on the right side. # Type your code here, # the bytecode will be displayed on the right automatically. for i in range(5): print("Hello world") Show Bytecode Show AST 0 0 RESUME 0 3 2 PUSH_NULL 4 LOAD_NAME 0 (range) 6 LOAD_CONST 0 (5) 8 PRECALL 1 12 CALL 1 22 GET_ITER >> 24 FOR_ITER 13 (to 52) 26…

saved by

related reading