You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 16:59:52 +08:00
support utf-8 in py3
This commit is contained in:
@@ -40,10 +40,9 @@ def _get_outstream(outfile):
|
|||||||
except OSError:
|
except OSError:
|
||||||
pass
|
pass
|
||||||
if PYTHON_VERSION < 3.0:
|
if PYTHON_VERSION < 3.0:
|
||||||
kw = {'mode':'wb'}
|
return open(outfile, mode='wb')
|
||||||
else:
|
else:
|
||||||
kw= = {'mode':'w', 'encoding':'utf-8'}
|
return open(outfile, mode='w', encoding='utf-8')
|
||||||
return open(outfile, **kw)
|
|
||||||
|
|
||||||
def decompile(
|
def decompile(
|
||||||
bytecode_version, co, out=None, showasm=None, showast=False,
|
bytecode_version, co, out=None, showasm=None, showast=False,
|
||||||
|
Reference in New Issue
Block a user