Skip to content

Commit 9e3845a

Browse files
Added fileno() method to StdoutProxy.
1 parent 02fa485 commit 9e3845a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

prompt_toolkit/patch_stdout.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,3 +143,10 @@ def flush(self):
143143
"""
144144
with self._lock:
145145
self._flush()
146+
147+
def fileno(self):
148+
"""
149+
Return file descriptor.
150+
"""
151+
# This is important for code that expects sys.stdout.fileno() to work.
152+
return self.original_stdout.fileno()

0 commit comments

Comments
 (0)