From 36272c3f08115a17147a7da3ea9bd7e67321f06f Mon Sep 17 00:00:00 2001 From: moculus Date: Fri, 6 Mar 2009 13:30:22 +0000 Subject: [PATCH] created some class constants --HG-- branch : pmacs2 --- buffer/emul.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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: