parent
bfd99cab5d
commit
36272c3f08
|
@ -9,6 +9,8 @@ class XTermBuffer(Buffer, XTerm):
|
||||||
btype = 'term'
|
btype = 'term'
|
||||||
modename = 'pipe'
|
modename = 'pipe'
|
||||||
termtype = 'xterm'
|
termtype = 'xterm'
|
||||||
|
delay = 0.1
|
||||||
|
bufsize = 8192
|
||||||
def __init__(self, app, cmd, args, name=None):
|
def __init__(self, app, cmd, args, name=None):
|
||||||
XTerm.__init__(self)
|
XTerm.__init__(self)
|
||||||
Buffer.__init__(self)
|
Buffer.__init__(self)
|
||||||
|
@ -131,11 +133,11 @@ class XTermBuffer(Buffer, XTerm):
|
||||||
if pid:
|
if pid:
|
||||||
break
|
break
|
||||||
if self._towrite:
|
if self._towrite:
|
||||||
ifd, ofd, efd = select.select([fd], [fd], [fd], 0.01)
|
ifd, ofd, efd = select.select([fd], [fd], [fd], self.delay)
|
||||||
else:
|
else:
|
||||||
ifd, ofd, efd = select.select([fd], [], [fd], 0.01)
|
ifd, ofd, efd = select.select([fd], [], [fd], self.delay)
|
||||||
if ifd:
|
if ifd:
|
||||||
data = os.read(ifd[0], 1024)
|
data = os.read(ifd[0], self.bufsize)
|
||||||
self.term_receive(data)
|
self.term_receive(data)
|
||||||
self.application.need_draw = True
|
self.application.need_draw = True
|
||||||
if ofd:
|
if ofd:
|
||||||
|
|
Loading…
Reference in New Issue