iteration on the dmg packager
[sface.git] / sface / logwindow.py
index c5c41dd..fd252ef 100644 (file)
@@ -6,6 +6,8 @@ from PyQt4.QtGui import *
 
 from sface.config import config
 
+import time
+
 class LogIO(QObject):
     def __init__(self, parent, old_stdout):
         QObject.__init__(self, parent)
@@ -17,7 +19,12 @@ class LogIO(QObject):
         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):
@@ -40,10 +47,7 @@ class LogWindow(QDialog):
         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)
-        
-        
-