def decompile_file( filename, outstream=None, showasm=None, showast=False, showgrammar=False, source_encoding=None, mapstream=None, do_fragments=False, ): """ decompile Python byte-code file (.pyc). Return objects to all of the deparsed objects found in `filename`. """ filename = check_object_path(filename) code_objects = {} (version, timestamp, magic_int, co, is_pypy, source_size, sip_hash) = load_module(filename, code_objects) if isinstance(co, list): deparsed = [] for con in co: deparsed.append( decompile( version, con, outstream, showasm, showast, timestamp, showgrammar, source_encoding, code_objects=code_objects, is_pypy=is_pypy, magic_int=magic_int, ), mapstream=mapstream, ) else: deparsed = [ decompile( version, co, outstream, showasm, showast, timestamp, showgrammar, source_encoding, code_objects=code_objects, source_size=source_size, is_pypy=is_pypy, magic_int=magic_int, mapstream=mapstream, do_fragments=do_fragments, ) ] co = None return deparsed
def uncompyle_file(filename, outstream=None, showasm=False, showast=False, showgrammar=False): """ decompile Python byte-code file (.pyc) """ filename = check_object_path(filename) code_objects = {} version, timestamp, magic_int, co = load_module(filename, code_objects) if type(co) == list: for con in co: uncompyle(version, con, outstream, showasm, showast, timestamp, showgrammar, code_objects=code_objects) else: uncompyle(version, co, outstream, showasm, showast, timestamp, showgrammar, code_objects=code_objects) co = None
def uncompyle_file(filename, outstream=None, showasm=False, showast=False, showgrammar=False): """ decompile Python byte-code file (.pyc) """ filename = check_object_path(filename) code_objects = {} version, timestamp, magic_int, co = load_module(filename, code_objects) if type(co) == list: for con in co: uncompyle(version, con, outstream, showasm, showast, timestamp, showgrammar, code_objects=code_objects) else: uncompyle(version, co, outstream, showasm, showast, timestamp, showgrammar, code_objects=code_objects) co = None
def decompile_file(filename, outstream=None, showasm=None, showast=False, showgrammar=False): """ decompile Python byte-code file (.pyc) """ filename = check_object_path(filename) code_objects = {} (version, timestamp, magic_int, co, is_pypy, source_size) = load_module(filename, code_objects) if type(co) == list: for con in co: decompile(version, con, outstream, showasm, showast, timestamp, showgrammar, code_objects=code_objects, is_pypy=is_pypy, magic_int=magic_int) else: decompile(version, co, outstream, showasm, showast, timestamp, showgrammar, code_objects=code_objects, source_size=source_size, is_pypy=is_pypy, magic_int=magic_int) co = None
def decompile_file(filename, outstream=None, showasm=None, showast=False, showgrammar=False): """ decompile Python byte-code file (.pyc) """ filename = check_object_path(filename) code_objects = {} (version, timestamp, magic_int, co, is_pypy, source_size) = load_module(filename, code_objects) if type(co) == list: for con in co: decompile(version, con, outstream, showasm, showast, timestamp, showgrammar, code_objects=code_objects, is_pypy=is_pypy, magic_int=magic_int) else: decompile(version, co, outstream, showasm, showast, timestamp, showgrammar, code_objects=code_objects, source_size=source_size, is_pypy=is_pypy, magic_int=magic_int) co = None