You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 08:49:51 +08:00
rename assembly phases and tweak a err msg...
before tokenization -> disassembly after tokenization -> tokenization
This commit is contained in:
@@ -372,7 +372,7 @@ def main(
|
|||||||
deparsed_object.f.close()
|
deparsed_object.f.close()
|
||||||
if PYTHON_VERSION_TRIPLE[:2] != deparsed_object.version[:2]:
|
if PYTHON_VERSION_TRIPLE[:2] != deparsed_object.version[:2]:
|
||||||
sys.stdout.write(
|
sys.stdout.write(
|
||||||
f"\n# skipping running {deparsed_object.f.name}; it is"
|
f"\n# skipping running {deparsed_object.f.name}; it is "
|
||||||
f"{version_tuple_to_str(deparsed_object.version, end=2)}, "
|
f"{version_tuple_to_str(deparsed_object.version, end=2)}, "
|
||||||
"and we are "
|
"and we are "
|
||||||
f"{version_tuple_to_str(PYTHON_VERSION_TRIPLE, end=2)}\n"
|
f"{version_tuple_to_str(PYTHON_VERSION_TRIPLE, end=2)}\n"
|
||||||
|
@@ -222,7 +222,7 @@ class Scanner37Base(Scanner):
|
|||||||
bytecode = self.build_instructions(co)
|
bytecode = self.build_instructions(co)
|
||||||
|
|
||||||
if show_asm in ("both", "before"):
|
if show_asm in ("both", "before"):
|
||||||
print("\n# ---- before tokenization:")
|
print("\n# ---- disassembly:")
|
||||||
self.insts = bytecode.disassemble_bytes(
|
self.insts = bytecode.disassemble_bytes(
|
||||||
co.co_code,
|
co.co_code,
|
||||||
varnames=co.co_varnames,
|
varnames=co.co_varnames,
|
||||||
@@ -534,7 +534,7 @@ class Scanner37Base(Scanner):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
if show_asm in ("both", "after"):
|
if show_asm in ("both", "after"):
|
||||||
print("\n# ---- after tokenization:")
|
print("\n# ---- tokenization:")
|
||||||
for t in tokens:
|
for t in tokens:
|
||||||
print(t.format(line_prefix=""))
|
print(t.format(line_prefix=""))
|
||||||
print()
|
print()
|
||||||
|
Reference in New Issue
Block a user