Skip to content

Commit 269d8cd

Browse files
committed
add: sport win32 stdin
1 parent 37e1463 commit 269d8cd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/os_3m_engine/common.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99
binary_stdin = sys.stdin.buffer
1010
else:
1111
import Queue
12+
if sys.platform == "win32":
13+
# set sys.stdin to binary mode
14+
import os
15+
import msvcrt
16+
msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY)
1217
binary_stdin = sys.stdin
1318

1419

0 commit comments

Comments
 (0)