diff options
| author | Lex Neva <github.com@lexneva.name> | 2018-08-03 22:39:52 -0400 |
|---|---|---|
| committer | Lex Neva <github.com@lexneva.name> | 2018-08-03 22:39:52 -0400 |
| commit | 89e5e5c9dbc036be1e0c2802e2324216c6a9ff0a (patch) | |
| tree | c6ac99817da9a78878d0d00b41fb493e62b1bf8a | |
| parent | 782b5efc71ab63a6becd7aa846feed5ea48a678a (diff) | |
stub should also open stdout in binary mode
| -rw-r--r-- | stub.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -33,6 +33,10 @@ args[0] = binary_path extension = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout, stderr = extension.communicate() +if sys.platform == "win32": + import msvcrt + msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY) + stdout = stdout.strip() if stdout: print stdout.strip(), |
