From 89e5e5c9dbc036be1e0c2802e2324216c6a9ff0a Mon Sep 17 00:00:00 2001 From: Lex Neva Date: Fri, 3 Aug 2018 22:39:52 -0400 Subject: [PATCH] stub should also open stdout in binary mode --- stub.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/stub.py b/stub.py index 850cfe404..6cd980cb9 100644 --- a/stub.py +++ b/stub.py @@ -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(),