from sface.config import config
+import time
+
class LogIO(QObject):
def __init__(self, parent, old_stdout):
QObject.__init__(self, parent)
self.parent().update()
def getText(self):
- return self.io.getvalue()
+ val = self.io.getvalue()
+ # looks like there is no other way
+ # to empty the StringIO
+ del self.io
+ self.io = StringIO()
+ return val
class LogWindow(QDialog):
def __init__(self, parent=None):
sys.stderr = self.logio
def update(self):
- self.text.setText(self.logio.getText())
+ self.text.insertPlainText(self.logio.getText())
c = self.text.textCursor()
c.movePosition(QTextCursor.End)
self.text.setTextCursor(c)
-
-
-