##// END OF EJS Templates
Get synchronous writes working under windows.
gvaroquaux -
Show More
@@ -174,10 +174,7 class ConsoleWidget(editwindow.EditWindow):
174 174 if refresh:
175 175 current_time = time.time()
176 176 if current_time - self._last_refresh_time > 0.03:
177 # Maybe this is faster than wx.Yield(), this is certainly
178 # more robust under windows, as it avoids recursive
179 # Yields.
180 self.ProcessEvent(wx.PaintEvent())
177 wx.Yield()
181 178 self._last_refresh_time = current_time
182 179
183 180
@@ -286,10 +286,12 class WxController(ConsoleWidget, PrefilterFrontEnd):
286 286 if i in self._markers:
287 287 self.MarkerDeleteHandle(self._markers[i])
288 288 self._markers[i] = self.MarkerAdd(i, _COMPLETE_BUFFER_MARKER)
289 # Update the display:
290 wx.Yield()
291 self.GotoPos(self.GetLength())
292 PrefilterFrontEnd.execute(self, python_string, raw_string=raw_string)
289 # Use a callafter to update the display robustly under windows
290 def callback():
291 self.GotoPos(self.GetLength())
292 PrefilterFrontEnd.execute(self, python_string,
293 raw_string=raw_string)
294 wx.CallAfter(callback)
293 295
294 296 def save_output_hooks(self):
295 297 self.__old_raw_input = __builtin__.raw_input
General Comments 0
You need to be logged in to leave comments. Login now