From 16d0c0dee3746cf77786b1826f93e52c6d68c5cc Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Wed, 13 Sep 2023 19:32:34 -0700 Subject: [PATCH] Replace CRLF with LF in stdout, stderr, because stdin reads double LF. --- voussoirkit/pipeable.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/voussoirkit/pipeable.py b/voussoirkit/pipeable.py index 6864a5d..af66c67 100644 --- a/voussoirkit/pipeable.py +++ b/voussoirkit/pipeable.py @@ -178,11 +178,13 @@ def output(stream, line, *, end): stream.flush() def stdout(line='', end='\n'): + line = line.replace('\r\n', '\n') # In pythonw, stdout is None. if sys.stdout is not None: output(sys.stdout, line, end=end) def stderr(line='', end='\n'): + line = line.replace('\r\n', '\n') # In pythonw, stderr is None. if sys.stderr is not None: output(sys.stderr, line, end=end)