Added the disassemble_pyc tool.
This commit is contained in:
parent
6807711384
commit
1106819e42
4 changed files with 8 additions and 3 deletions
3
tools.py
3
tools.py
|
|
@ -396,7 +396,8 @@ def python_tidy(path): # Deps: found on internet?
|
|||
|
||||
|
||||
def disassemble_pyc(path):
|
||||
bytecode = open(path, "rb").read()
|
||||
with open(path, "rb") as file_:
|
||||
bytecode = file_.read()
|
||||
stringio = io.StringIO()
|
||||
dis.dis(bytecode, file=stringio)
|
||||
stringio.seek(0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue