You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
Add tuple comma when not in BUILD_LIST_n
Fixes issue #57 bin/uncompile.py: --verify now works on a single bytecode file. We will set the output to be something created by tempfile.mktemps
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
# Copyright (c) 2000-2002 by hartmut Goebel <h.goebel@crazy-compilers.com>
|
||||
#
|
||||
from __future__ import print_function
|
||||
import sys, os, getopt, time
|
||||
import sys, os, getopt, tempfile, time
|
||||
|
||||
program, ext = os.path.splitext(os.path.basename(__file__))
|
||||
|
||||
@@ -143,9 +143,12 @@ def main_bin():
|
||||
print("No files given", file=sys.stderr)
|
||||
usage()
|
||||
|
||||
|
||||
if outfile == '-':
|
||||
outfile = None # use stdout
|
||||
if 'do_verify' in options and len(files) == 1:
|
||||
junk, outfile = tempfile.mkstemp(suffix=".pyc",
|
||||
prefix=files[0][0:-4]+'-')
|
||||
else:
|
||||
outfile = None # use stdout
|
||||
elif outfile and os.path.isdir(outfile):
|
||||
out_base = outfile; outfile = None
|
||||
elif outfile and len(files) > 1:
|
||||
|
Reference in New Issue
Block a user