9
self.buffer = cStringIO.StringIO()
16
def write(self, data):
17
## print >>sys.__stdout__, repr(data), self.softspace
18
if self.lg and self.lt != time.asctime():
19
self.lt = time.asctime()
22
sys.__stdout__.write(x)
24
self.lg = data[-1:] == '\n'
25
x = data.replace('\r', '').replace('\n', '\r\n')
27
sys.__stdout__.write(x.encode('utf8'))
30
sys.__stdout__.flush()
34
class logger(wx.TextCtrl):
35
def __init__(self, parent):
36
wx.TextCtrl.__init__(self, parent, -1, style=wx.TE_READONLY|wx.TE_MULTILINE|wx.TE_RICH)
43
self.AppendText(l.buffer.read())
46
def write(self, data):
47
## print >>sys.__stdout__, repr(data), self.softspace
48
if self.lg and self.lt != time.asctime():
49
self.lt = time.asctime()
52
sys.__stdout__.write(x)
54
self.lg = data[-1:] == '\n'
55
x = data.replace('\r', '').replace('\n', '\r\n')
57
sys.__stdout__.write(data.encode('utf8'))