git://git.onelab.eu
/
sface.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Setting tag sface-0.1-18
[sface.git]
/
sface
/
logwindow.py
diff --git
a/sface/logwindow.py
b/sface/logwindow.py
index
c5c41dd
..
fd252ef
100644
(file)
--- a/
sface/logwindow.py
+++ b/
sface/logwindow.py
@@
-6,6
+6,8
@@
from PyQt4.QtGui import *
from sface.config import config
from sface.config import config
+import time
+
class LogIO(QObject):
def __init__(self, parent, old_stdout):
QObject.__init__(self, parent)
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):
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):
class LogWindow(QDialog):
def __init__(self, parent=None):
@@
-40,10
+47,7
@@
class LogWindow(QDialog):
sys.stderr = self.logio
def update(self):
sys.stderr = self.logio
def update(self):
- self.text.
set
Text(self.logio.getText())
+ self.text.
insertPlain
Text(self.logio.getText())
c = self.text.textCursor()
c.movePosition(QTextCursor.End)
self.text.setTextCursor(c)
c = self.text.textCursor()
c.movePosition(QTextCursor.End)
self.text.setTextCursor(c)
-
-
-