Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Lib/_pyrepl/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
raise RuntimeError("Windows 10 TH2 or later required")
if not os.isatty(sys.stdin.fileno()):
raise OSError(errno.ENOTTY, "tty required", "stdin")
if not os.isatty(sys.stdout.fileno()):
raise OSError(errno.ENOTTY, "tty required", "stdout")
from .simple_interact import check
if err := check():
raise RuntimeError(err)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
The new REPL now falls back to basic REPL if stdout is non-interactive.
Previously it could flood the output if such stdout was a broken pipe.
Contributed by Bartosz Sławecki.
Loading