Revert buffering

This commit is contained in:
Oleksii Shevchuk 2016-08-26 01:34:53 +03:00
parent 338cda7af1
commit 425c54e90b
1 changed files with 5 additions and 1 deletions

View File

@ -79,11 +79,15 @@ class InteractiveShell(PupyModule):
self._signal_winch(None, None) # set the remote tty sie to the current terminal size
try:
tty.setraw(fd)
buf=b''
while True:
r, w, x = select.select([sys.stdin], [], [], 0)
if sys.stdin in r:
ch = os.read(fd, 1)
self.ps.write(ch)
buf += ch
elif buf:
self.ps.write(buf)
buf=b''
elif is_closed.is_set():
break
else: