+ self.logio = LogIO(self, sys.stdout)
+
+ def redirectOutput(self):
+ print "\n\nRedirecting all output to Log Window. Please open the log window to see the output\n"
+ self.old_stdout = sys.stdout
+ self.old_stderr = sys.stderr
+ sys.stdout = self.logio
+ sys.stderr = self.logio
+
+ def update(self):
+ self.text.insertPlainText(self.logio.getText())
+ c = self.text.textCursor()
+ c.movePosition(QTextCursor.End)
+ self.text.setTextCursor(c)