252 self.lock.acquire() |
252 self.lock.acquire() |
253 for s, style in self.stack: |
253 for s, style in self.stack: |
254 if style is None : style=self.black_white |
254 if style is None : style=self.black_white |
255 if style != self.black_white: |
255 if style != self.black_white: |
256 self.output.StartStyling(self.output.GetLength(), 0xff) |
256 self.output.StartStyling(self.output.GetLength(), 0xff) |
|
257 |
|
258 # Temporary deactivate read only mode on StyledTextCtrl for adding text |
|
259 # It seems that text modifications, even programmatically, are disabled |
|
260 # in StyledTextCtrl when read only is active |
257 self.output.SetReadOnly(False) |
261 self.output.SetReadOnly(False) |
258 self.output.AddText(s) |
262 self.output.AddText(s) |
259 self.output.SetReadOnly(True) |
263 self.output.SetReadOnly(True) |
|
264 |
260 if style != self.black_white: |
265 if style != self.black_white: |
261 self.output.SetStyling(len(s), style) |
266 self.output.SetStyling(len(s), style) |
262 self.stack = [] |
267 self.stack = [] |
263 self.lock.release() |
268 self.lock.release() |
264 self.output.ScrollToLine(self.output.GetLineCount()) |
269 self.output.ScrollToLine(self.output.GetLineCount()) |
282 def writeyield(self, s): |
287 def writeyield(self, s): |
283 self.write(s) |
288 self.write(s) |
284 wx.GetApp().Yield() |
289 wx.GetApp().Yield() |
285 |
290 |
286 def flush(self): |
291 def flush(self): |
|
292 # Temporary deactivate read only mode on StyledTextCtrl for clearing text |
|
293 # It seems that text modifications, even programmatically, are disabled |
|
294 # in StyledTextCtrl when read only is active |
|
295 self.output.SetReadOnly(False) |
287 self.output.SetText("") |
296 self.output.SetText("") |
|
297 self.output.SetReadOnly(True) |
288 |
298 |
289 def isatty(self): |
299 def isatty(self): |
290 return false |
300 return false |
291 |
301 |
292 [ID_BEREMIZ, ID_BEREMIZMAINSPLITTER, |
302 [ID_BEREMIZ, ID_BEREMIZMAINSPLITTER, |