Show More
@@ -69,10 +69,6 b' class PrefilterFrontEnd(LineFrontEndBase):' | |||
|
69 | 69 | setattr(_ip.IP, 'magic_%s' % alias_name, magic) |
|
70 | 70 | # FIXME: I should create a real file-like object dedicated to this |
|
71 | 71 | # terminal |
|
72 | Term.cout.flush = lambda : None | |
|
73 | Term.cout.getvalue = lambda : '' | |
|
74 | Term.cerr.flush = lambda : None | |
|
75 | Term.cerr.getvalue = lambda : '' | |
|
76 | 72 | self.shell.output_trap = SyncOutputTrap(write_out=self.write, |
|
77 | 73 | write_err=self.write) |
|
78 | 74 |
@@ -207,18 +207,16 b' class ConsoleWidget(editwindow.EditWindow):' | |||
|
207 | 207 | self.AppendText(segment) |
|
208 | 208 | |
|
209 | 209 | if segments: |
|
210 | ansi_tags = self.color_pat.findall(text) | |
|
211 | ||
|
212 | for tag in ansi_tags: | |
|
213 | i = segments.index(tag) | |
|
210 | for ansi_tag, text in zip(segments[::2], segments[1::2]): | |
|
214 | 211 | self.StartStyling(self.GetLength(), 0xFF) |
|
215 |
self.AppendText( |
|
|
212 | self.AppendText(text) | |
|
216 | 213 | |
|
217 |
if tag |
|
|
218 |
s |
|
|
219 | self.ANSI_STYLES[tag][0]) | |
|
214 | if ansi_tag == '0': | |
|
215 | style = 0 | |
|
216 | else: | |
|
217 | style = self.ANSI_STYLES[ansi_tag][0] | |
|
220 | 218 | |
|
221 | segments.pop(i) | |
|
219 | self.SetStyling(len(text), style) | |
|
222 | 220 | |
|
223 | 221 | self.GotoPos(self.GetLength()) |
|
224 | 222 | wx.Yield() |
General Comments 0
You need to be logged in to leave comments.
Login now