You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Fix up Python 2.x's ability to get code from Python 3.x's bytecode
This commit is contained in:
@@ -32,14 +32,6 @@ else:
|
||||
from uncompyle6.opcodes import opcode_25, opcode_26, opcode_27, opcode_32, opcode_33, opcode_34
|
||||
|
||||
|
||||
class GenericPythonCode:
|
||||
'''
|
||||
Class for representing code-like objects across different versions of
|
||||
Python.
|
||||
'''
|
||||
def __init__(self):
|
||||
return
|
||||
|
||||
class Code:
|
||||
'''
|
||||
Class for representing code-objects.
|
||||
@@ -321,7 +313,7 @@ if __name__ == "__main__":
|
||||
import inspect, uncompyle6
|
||||
co = inspect.currentframe().f_code
|
||||
scanner = get_scanner(uncompyle6.PYTHON_VERSION)
|
||||
tokens, customize = scanner.disassemble(co)
|
||||
tokens, customize = scanner.disassemble(co, {})
|
||||
print('-' * 30)
|
||||
for t in tokens:
|
||||
print(t)
|
||||
|
Reference in New Issue
Block a user