You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 16:59:52 +08:00
decompile bytecode_version defaults to Python intepreter version
Fixes #189
This commit is contained in:
@@ -17,6 +17,7 @@ import datetime, os, subprocess, sys, tempfile
|
||||
|
||||
from uncompyle6 import verify, IS_PYPY, PYTHON_VERSION
|
||||
from xdis.code import iscode
|
||||
from xdis.magics import sysinfo2float
|
||||
from uncompyle6.disas import check_object_path
|
||||
from uncompyle6.semantics import pysource
|
||||
from uncompyle6.parser import ParserError
|
||||
@@ -52,8 +53,14 @@ def decompile(
|
||||
"""
|
||||
ingests and deparses a given code block 'co'
|
||||
|
||||
if `bytecode_version` is None, use the current Python intepreter
|
||||
version.
|
||||
|
||||
Caller is responsible for closing `out` and `mapstream`
|
||||
"""
|
||||
if bytecode_version is None:
|
||||
bytecode_version = sysinfo2float()
|
||||
|
||||
# store final output stream for case of error
|
||||
real_out = out or sys.stdout
|
||||
|
||||
|
Reference in New Issue
Block a user