MCPcopy
hub / github.com/rocky/python-uncompyle6 / disassemble_file

Function disassemble_file

uncompyle6/code_fns.py:102–117  ·  view source on GitHub ↗

Disassemble Python byte-code file (.pyc). If given a Python source file (".py") file, we'll try to find the corresponding compiled object.

(filename, outstream=None)

Source from the content-addressed store, hash-verified

100
101
102def disassemble_file(filename, outstream=None):
103 """
104 Disassemble Python byte-code file (.pyc).
105
106 If given a Python source file (".py") file, we'll
107 try to find the corresponding compiled object.
108 """
109 filename = check_object_path(filename)
110 (version, timestamp, magic_int, co, is_pypy, source_size, sip_hash) = load_module(
111 filename
112 )
113 if type(co) == list:
114 for con in co:
115 disco(version, con, outstream)
116 else:
117 disco(version, co, outstream, is_pypy=is_pypy)
118
119
120def _test():

Callers 3

mainFunction · 0.90
test_funcoutputFunction · 0.90
_testFunction · 0.85

Calls 1

discoFunction · 0.85

Tested by 1

test_funcoutputFunction · 0.72