UI/UserInterface.py

branch
5_3_x
changeset 2561
b396baae6aa7
parent 2558
bc79bae54496
child 2631
06f866e83d3a
equal deleted inserted replaced
2558:bc79bae54496 2561:b396baae6aa7
4158 4158
4159 if toolProcData[0] is None or \ 4159 if toolProcData[0] is None or \
4160 toolProcData[1] not in ["insert", "replaceSelection"]: 4160 toolProcData[1] not in ["insert", "replaceSelection"]:
4161 # not connected to an editor or wrong mode 4161 # not connected to an editor or wrong mode
4162 while toolProc.canReadLine(): 4162 while toolProc.canReadLine():
4163 s = "{0} - ".format(program)
4164 output = str(toolProc.readLine(), ioEncoding, 'replace') 4163 output = str(toolProc.readLine(), ioEncoding, 'replace')
4165 s.append(output) 4164 s = "{0} - {1}".format(program, output)
4166 self.appendToStdout(s) 4165 self.appendToStdout(s)
4167 else: 4166 else:
4168 if toolProcData[1] == "insert": 4167 if toolProcData[1] == "insert":
4169 text = str(toolProc.readAll(), ioEncoding, 'replace') 4168 text = str(toolProc.readAll(), ioEncoding, 'replace')
4170 toolProcData[0].insert(text) 4169 toolProcData[0].insert(text)
4181 # loop through all running tool processes 4180 # loop through all running tool processes
4182 for program, toolProc, toolProcData in self.toolProcs: 4181 for program, toolProc, toolProcData in self.toolProcs:
4183 toolProc.setReadChannel(QProcess.StandardError) 4182 toolProc.setReadChannel(QProcess.StandardError)
4184 4183
4185 while toolProc.canReadLine(): 4184 while toolProc.canReadLine():
4186 s = "{0} - ".format(program)
4187 error = str(toolProc.readLine(), ioEncoding, 'replace') 4185 error = str(toolProc.readLine(), ioEncoding, 'replace')
4188 s.append(error) 4186 s = "{0} - {1}".format(program, error)
4189 self.appendToStderr(s) 4187 self.appendToStderr(s)
4190 4188
4191 def __toolFinished(self, exitCode, exitStatus): 4189 def __toolFinished(self, exitCode, exitStatus):
4192 """ 4190 """
4193 Private slot to handle the finished signal of a tool process. 4191 Private slot to handle the finished signal of a tool process.

eric ide

mercurial