X-Git-Url: http://git.onelab.eu/?p=sface.git;a=blobdiff_plain;f=sface%2Fsfiprocess.py;h=38fb12bc9011f11b41d88b81a91883bb71aa75f0;hp=61018895a1daa8253aeeb65910900ba737d3803d;hb=622bf37d1ff35486e7863ba77fe7683b12fb12d1;hpb=154bcc2afda6ff1d2889f8d6b120becbedb3b707 diff --git a/sface/sfiprocess.py b/sface/sfiprocess.py index 6101889..38fb12b 100644 --- a/sface/sfiprocess.py +++ b/sface/sfiprocess.py @@ -23,6 +23,10 @@ class SfiProcess(QObject): self.process = QProcess() self.connect(self.process, SIGNAL("finished(int, QProcess::ExitStatus)"), self.processFinished) + self.connect(self.process, SIGNAL("readyReadStandardOutput()"), + self.processStandardOutput) + self.connect(self.process, SIGNAL("readyReadStandardError()"), + self.processStandardError) def __init_command(self, args): self.args = QStringList() @@ -36,6 +40,14 @@ class SfiProcess(QObject): def isRunning(self): return self.process.state() != QProcess.NotRunning + def processStandardOutput(self): + output = self.process.readAllStandardOutput() + if self.debug: + print output + + def processStandardError(self): + print self.process.readAllStandardError() + def processFinished(self): if self.process.exitStatus() == QProcess.CrashExit: print self.readOutput()