15 from PyQt4.QtGui import * |
15 from PyQt4.QtGui import * |
16 from PyQt4.Qsci import QsciScintilla |
16 from PyQt4.Qsci import QsciScintilla |
17 |
17 |
18 from E4Gui.E4Application import e4App |
18 from E4Gui.E4Application import e4App |
19 |
19 |
20 import Lexers |
20 from . import Lexers |
21 from QsciScintillaCompat import QsciScintillaCompat, QSCINTILLA_VERSION |
21 from .QsciScintillaCompat import QsciScintillaCompat, QSCINTILLA_VERSION |
22 |
22 |
23 import Preferences |
23 import Preferences |
24 import Utilities |
24 import Utilities |
25 |
25 |
26 import UI.PixmapCache |
26 import UI.PixmapCache |
27 from Utilities import toUnicode |
27 from Utilities import toUnicode |
28 |
28 |
29 from ShellHistoryDialog import ShellHistoryDialog |
29 from .ShellHistoryDialog import ShellHistoryDialog |
30 |
30 |
31 class Terminal(QsciScintillaCompat): |
31 class Terminal(QsciScintillaCompat): |
32 """ |
32 """ |
33 Class implementing a simple terminal based on QScintilla. |
33 Class implementing a simple terminal based on QScintilla. |
34 |
34 |
177 |
177 |
178 def __readOutput(self): |
178 def __readOutput(self): |
179 """ |
179 """ |
180 Private method to process the output of the shell. |
180 Private method to process the output of the shell. |
181 """ |
181 """ |
182 output = unicode(self.__process.readAllStandardOutput(), |
182 output = str(self.__process.readAllStandardOutput(), |
183 self.__ioEncoding, 'replace') |
183 self.__ioEncoding, 'replace') |
184 self.__write(self.ansi_re.sub("", output)) |
184 self.__write(self.ansi_re.sub("", output)) |
185 self.__lastPos = self.__getEndPos() |
185 self.__lastPos = self.__getEndPos() |
186 |
186 |
187 def __started(self): |
187 def __started(self): |