Show More
@@ -23,6 +23,7 b' import wx' | |||||
23 | import wx.stc as stc |
|
23 | import wx.stc as stc | |
24 |
|
24 | |||
25 | from wx.py import editwindow |
|
25 | from wx.py import editwindow | |
|
26 | import time | |||
26 | import sys |
|
27 | import sys | |
27 | LINESEP = '\n' |
|
28 | LINESEP = '\n' | |
28 | if sys.platform == 'win32': |
|
29 | if sys.platform == 'win32': | |
@@ -115,6 +116,9 b' class ConsoleWidget(editwindow.EditWindow):' | |||||
115 | # The color of the carret (call _apply_style() after setting) |
|
116 | # The color of the carret (call _apply_style() after setting) | |
116 | carret_color = 'BLACK' |
|
117 | carret_color = 'BLACK' | |
117 |
|
118 | |||
|
119 | # Store the last time a refresh was done | |||
|
120 | _last_refresh_time = 0 | |||
|
121 | ||||
118 | #-------------------------------------------------------------------------- |
|
122 | #-------------------------------------------------------------------------- | |
119 | # Public API |
|
123 | # Public API | |
120 | #-------------------------------------------------------------------------- |
|
124 | #-------------------------------------------------------------------------- | |
@@ -170,7 +174,10 b' class ConsoleWidget(editwindow.EditWindow):' | |||||
170 | if refresh: |
|
174 | if refresh: | |
171 | # Maybe this is faster than wx.Yield() |
|
175 | # Maybe this is faster than wx.Yield() | |
172 | self.ProcessEvent(wx.PaintEvent()) |
|
176 | self.ProcessEvent(wx.PaintEvent()) | |
173 | #wx.Yield() |
|
177 | current_time = time.time() | |
|
178 | if current_time - self._last_refresh_time > 0.03: | |||
|
179 | wx.Yield() | |||
|
180 | self._last_refresh_time = current_time | |||
174 |
|
181 | |||
175 |
|
182 | |||
176 | def new_prompt(self, prompt): |
|
183 | def new_prompt(self, prompt): |
General Comments 0
You need to be logged in to leave comments.
Login now