##// END OF EJS Templates
Fix for Unicode characters when executing processes. Also fix typo in...
Gael Varoquaux -
Show More
@@ -212,12 +212,20 b' class ConsoleWidget(editwindow.EditWindow):'
212 segment = segments.pop(0)
212 segment = segments.pop(0)
213 self.GotoPos(self.GetLength())
213 self.GotoPos(self.GetLength())
214 self.StartStyling(self.GetLength(), 0xFF)
214 self.StartStyling(self.GetLength(), 0xFF)
215 self.AppendText(segment)
215 try:
216 self.AppendText(segment)
217 except UnicodeDecodeError:
218 # XXX: Do I really want to skip the exception?
219 pass
216
220
217 if segments:
221 if segments:
218 for ansi_tag, text in zip(segments[::2], segments[1::2]):
222 for ansi_tag, text in zip(segments[::2], segments[1::2]):
219 self.StartStyling(self.GetLength(), 0xFF)
223 self.StartStyling(self.GetLength(), 0xFF)
220 self.AppendText(text)
224 try:
225 self.AppendText(text)
226 except UnicodeDecodeError:
227 # XXX: Do I really want to skip the exception?
228 pass
221
229
222 if ansi_tag not in self.ANSI_STYLES:
230 if ansi_tag not in self.ANSI_STYLES:
223 style = 0
231 style = 0
@@ -276,6 +276,7 b' class WxController(PrefilterFrontEnd, ConsoleWidget):'
276 """ Capture the character events, let the parent
276 """ Capture the character events, let the parent
277 widget handle them, and put our logic afterward.
277 widget handle them, and put our logic afterward.
278 """
278 """
279 # FIXME: This method needs to be broken down in smaller ones.
279 current_line_number = self.GetCurrentLine()
280 current_line_number = self.GetCurrentLine()
280 if event.KeyCode in (ord('c'), ord('C')) and event.ControlDown():
281 if event.KeyCode in (ord('c'), ord('C')) and event.ControlDown():
281 # Capture Control-C
282 # Capture Control-C
@@ -34,7 +34,7 b' class SyncTracebackTrap(TracebackTrap):'
34 """
34 """
35 self.args = args
35 self.args = args
36
36
37 print self.sync_formatters(*self.args)
37 print self.sync_formatter(*self.args)
38
38
39
39
40
40
General Comments 0
You need to be logged in to leave comments. Login now