Remove test code for reading character by character.
It'll be in git history if ever needed, but it's unlikely this will ever be
implemented as it's needlessly complex.
@@ -491,46 +491,6 @@ def read_buffer(io, print_output=False, print_func=None):
Reads a file-like buffer object into lines and optionally prints the output.
'''
- # TODO: research this further - some steps towards handling stdin (ie password requests
- # from programs that don't notice there's no TTY to accept passwords from!). This just
- # prints output as below, but stores partial lines in a buffer, which could be printed
- # when ready to accept input. Or detected and raise an error.
-
- # GitHub issue: https://github.com/Fizzadar/pyinfra/issues/40
-
- # buff = ''
- # data = io.read(1)
-
- # while data:
- # # Append to the buffer
- # buff += data
-
- # # Newlines in the buffer? Break them out
- # if '\n' in buff:
- # lines = buff.split('\n')
-
- # # Set the buffer back to just the last line
- # buff = lines[-1]
-
- # # Get the other lines, strip them
- # lines = [
- # line.strip()
- # for line in lines[:-1]
- # ]
-
- # out.extend(lines)
-
- # for line in lines:
- # _print(line)
-
- # # Get next data
- # data = io.read(1)
-
- # if buff:
- # line = buff.strip()
- # out.append(line)
- # _print(line)
-
def _print(line):
if print_output:
if print_func:
