Mercurial > hgrepos > Python > apps > py-cutils
comparison shasum.py @ 11:15c3416d3677
FIX: "msvcrt" is a top-level module on Windows
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Fri, 04 Dec 2020 16:13:02 +0100 |
| parents | 77446cd3ea6f |
| children | 5e2c9123f93f |
comparison
equal
deleted
inserted
replaced
| 10:77446cd3ea6f | 11:15c3416d3677 |
|---|---|
| 67 else: | 67 else: |
| 68 out = out_std | 68 out = out_std |
| 69 if len(opts.files) == 1 and opts.files[0] == '-': | 69 if len(opts.files) == 1 and opts.files[0] == '-': |
| 70 if PY2: | 70 if PY2: |
| 71 if sys.platform == "win32": | 71 if sys.platform == "win32": |
| 72 import os. msvcrt | 72 import os, msvcrt # noqa: E401 |
| 73 msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY) | 73 msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY) |
| 74 source = sys.stdin | 74 source = sys.stdin |
| 75 else: | 75 else: |
| 76 source = sys.stdin.buffer | 76 source = sys.stdin.buffer |
| 77 out(sys.stdout, | 77 out(sys.stdout, |
