8000 Fixed `Application.run_system_command` on Windows. · mxr/python-prompt-toolkit@fb794ce · GitHub
[go: up one dir, main page]

Skip to content

Commit fb794ce

Browse files
Fixed Application.run_system_command on Windows.
1 parent 9f79a7b commit fb794ce

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

prompt_toolkit/input/win32.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,11 @@ def cooked_mode(self):
6767
return cooked_mode()
6868

6969
def fileno(self):
70-
"""
71-
The windows console doesn't depend on the file handle.
72-
"""
73-
raise NotImplementedError
70+
# The windows console doesn't depend on the file handle, so
71+
# this is not used for the event loop (which uses the
72+
# handle instead). But it's used in `Application.run_system_command`
73+
# which opens a subprocess with a given stdin/stdout.
74+
return sys.stdin.fileno()
7475

7576
def typeahead_hash(self):
7677
return 'win32-input'

0 commit comments

Comments
 (0)
0