From 797b4efd8948fe03c3028375beb9a39cb84dfaa5 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Wed, 26 Jan 2022 21:42:44 -0800 Subject: [PATCH] Let pipeable.output be a public function. --- voussoirkit/pipeable.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/voussoirkit/pipeable.py b/voussoirkit/pipeable.py index 8bdb19a..6864a5d 100644 --- a/voussoirkit/pipeable.py +++ b/voussoirkit/pipeable.py @@ -169,7 +169,7 @@ def input_many(args, *input_args, **input_kwargs): for arg in args: yield from input(arg, *input_args, **input_kwargs) -def _output(stream, line, end): +def output(stream, line, *, end): line = str(line) stream.write(line) if not line.endswith(end): @@ -180,12 +180,12 @@ def _output(stream, line, end): def stdout(line='', end='\n'): # In pythonw, stdout is None. if sys.stdout is not None: - _output(sys.stdout, line, end) + output(sys.stdout, line, end=end) def stderr(line='', end='\n'): # In pythonw, stderr is None. if sys.stderr is not None: - _output(sys.stderr, line, end) + output(sys.stderr, line, end=end) # In pythonw, stdin and stdout are None. def stdin_tty():