diff --git a/buffer/emul.py b/buffer/emul.py index 0f40893..a84df34 100644 --- a/buffer/emul.py +++ b/buffer/emul.py @@ -9,6 +9,8 @@ class XTermBuffer(Buffer, XTerm): btype = 'term' modename = 'pipe' termtype = 'xterm' + delay = 0.1 + bufsize = 8192 def __init__(self, app, cmd, args, name=None): XTerm.__init__(self) Buffer.__init__(self) @@ -131,11 +133,11 @@ class XTermBuffer(Buffer, XTerm): if pid: break if self._towrite: - ifd, ofd, efd = select.select([fd], [fd], [fd], 0.01) + ifd, ofd, efd = select.select([fd], [fd], [fd], self.delay) else: - ifd, ofd, efd = select.select([fd], [], [fd], 0.01) + ifd, ofd, efd = select.select([fd], [], [fd], self.delay) if ifd: - data = os.read(ifd[0], 1024) + data = os.read(ifd[0], self.bufsize) self.term_receive(data) self.application.need_draw = True if ofd: