Skip to content

Commit ccff7c5

Browse files
committed
Fallback to basic REPL for non-TTY stdout
1 parent e22c495 commit ccff7c5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Lib/_pyrepl/main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
raise RuntimeError("Windows 10 TH2 or later required")
1212
if not os.isatty(sys.stdin.fileno()):
1313
raise OSError(errno.ENOTTY, "tty required", "stdin")
14+
if not os.isatty(sys.stdout.fileno()):
15+
raise OSError(errno.ENOTTY, "tty required", "stdout")
1416
from .simple_interact import check
1517
if err := check():
1618
raise RuntimeError(err)

0 commit comments

Comments
 (0)