diff options
| author | deshevoy <[email protected]> | 2022-02-10 16:46:57 +0300 |
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:46:57 +0300 |
| commit | 28148f76dbfcc644d96427d41c92f36cbf2fdc6e (patch) | |
| tree | b83306b6e37edeea782e9eed673d89286c4fef35 /contrib/tools/python3/pycc | |
| parent | e988f30484abe5fdeedcc7a5d3c226c01a21800c (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'contrib/tools/python3/pycc')
| -rwxr-xr-x | contrib/tools/python3/pycc/main.py | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/contrib/tools/python3/pycc/main.py b/contrib/tools/python3/pycc/main.py index 9024120b7ec..996edb2bdda 100755 --- a/contrib/tools/python3/pycc/main.py +++ b/contrib/tools/python3/pycc/main.py @@ -1,19 +1,19 @@ -import marshal -import sys - - -def main(): - srcpathx, in_fname, out_fname = sys.argv[1:] - srcpath = srcpathx[:-1] - - with open(in_fname, 'r', encoding='utf-8') as in_file: - source = in_file.read() - - code = compile(source, srcpath, 'exec', dont_inherit=True) - - with open(out_fname, 'wb') as out_file: - marshal.dump(code, out_file) - - +import marshal +import sys + + +def main(): + srcpathx, in_fname, out_fname = sys.argv[1:] + srcpath = srcpathx[:-1] + + with open(in_fname, 'r', encoding='utf-8') as in_file: + source = in_file.read() + + code = compile(source, srcpath, 'exec', dont_inherit=True) + + with open(out_fname, 'wb') as out_file: + marshal.dump(code, out_file) + + if __name__ == '__main__': - main() + main() |
