Plugins/DocumentationPlugins/Ericapi/EricapiExecDialog.py

changeset 12
1d8dd9706f46
parent 0
de9c2efb9d02
child 13
1af94a91f439
equal deleted inserted replaced
11:b0996e4a289e 12:1d8dd9706f46
10 import os.path 10 import os.path
11 11
12 from PyQt4.QtCore import * 12 from PyQt4.QtCore import *
13 from PyQt4.QtGui import * 13 from PyQt4.QtGui import *
14 14
15 from Ui_EricapiExecDialog import Ui_EricapiExecDialog 15 from .Ui_EricapiExecDialog import Ui_EricapiExecDialog
16
17 import Preferences
16 18
17 class EricapiExecDialog(QDialog, Ui_EricapiExecDialog): 19 class EricapiExecDialog(QDialog, Ui_EricapiExecDialog):
18 """ 20 """
19 Class implementing a dialog to show the output of the ericapi process. 21 Class implementing a dialog to show the output of the ericapi process.
20 22
130 the contents pane. 132 the contents pane.
131 """ 133 """
132 self.process.setReadChannel(QProcess.StandardOutput) 134 self.process.setReadChannel(QProcess.StandardOutput)
133 135
134 while self.process.canReadLine(): 136 while self.process.canReadLine():
135 s = unicode(self.process.readLine()) 137 s = str(self.process.readLine(),
138 Preferences.getSystem("IOEncoding"),
139 'replace')
136 self.contents.insertPlainText(s) 140 self.contents.insertPlainText(s)
137 self.contents.ensureCursorVisible() 141 self.contents.ensureCursorVisible()
138 142
139 def __readStderr(self): 143 def __readStderr(self):
140 """ 144 """
145 """ 149 """
146 self.process.setReadChannel(QProcess.StandardError) 150 self.process.setReadChannel(QProcess.StandardError)
147 151
148 while self.process.canReadLine(): 152 while self.process.canReadLine():
149 self.errorGroup.show() 153 self.errorGroup.show()
150 s = unicode(self.process.readLine()) 154 s = str(self.process.readLine(),
155 Preferences.getSystem("IOEncoding"),
156 'replace')
151 self.errors.insertPlainText(s) 157 self.errors.insertPlainText(s)
152 self.errors.ensureCursorVisible() 158 self.errors.ensureCursorVisible()

eric ide

mercurial