git://git.onelab.eu
/
sface.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6933032
)
cleaning statement to sys.__stdout__
author
Giovanni Gherdovich
<ggherdov@brentaal.inria.fr>
Mon, 11 Oct 2010 14:24:30 +0000
(16:24 +0200)
committer
Giovanni Gherdovich
<ggherdov@brentaal.inria.fr>
Mon, 11 Oct 2010 14:24:30 +0000
(16:24 +0200)
sface/logwindow.py
patch
|
blob
|
history
diff --git
a/sface/logwindow.py
b/sface/logwindow.py
index
7c07b43
..
fd252ef
100644
(file)
--- a/
sface/logwindow.py
+++ b/
sface/logwindow.py
@@
-19,14
+19,11
@@
class LogIO(QObject):
self.parent().update()
def getText(self):
self.parent().update()
def getText(self):
- self.old_stdout.write("getText: ENTERING\n")
val = self.io.getvalue()
# looks like there is no other way
# to empty the StringIO
del self.io
self.io = StringIO()
val = self.io.getvalue()
# looks like there is no other way
# to empty the StringIO
del self.io
self.io = StringIO()
- self.old_stdout.write("getText: GOT VALUE\n")
- self.old_stdout.write(val + "\n")
return val
class LogWindow(QDialog):
return val
class LogWindow(QDialog):
@@
-50,15
+47,7
@@
class LogWindow(QDialog):
sys.stderr = self.logio
def update(self):
sys.stderr = self.logio
def update(self):
- #starttime = time.time()
- #self.logio.old_stdout.write("update: entering\n")#.flush()
- #self.logio.old_stdout.write('one\n')#.flush()
self.text.insertPlainText(self.logio.getText())
self.text.insertPlainText(self.logio.getText())
- #self.logio.old_stdout.write('two\n')#.flush()
c = self.text.textCursor()
c = self.text.textCursor()
- #self.logio.old_stdout.write('three\n')#.flush()
c.movePosition(QTextCursor.End)
c.movePosition(QTextCursor.End)
- #self.logio.old_stdout.write('four\n')#.flush()
self.text.setTextCursor(c)
self.text.setTextCursor(c)
- #self.logio.old_stdout.write('five\n')#.flush()
- #self.logio.old_stdout.write("update: done \n")# + time.strftime(('%M:%S'),"[%.3f s]"%(time.time() - starttime)))#.flush()