##// END OF EJS Templates
Fix raw_input.
gvaroquaux -
Show More
@@ -192,7 +192,6 b' class ConsoleWidget(editwindow.EditWindow):'
192 192 # now we update our cursor giving end of prompt
193 193 self.current_prompt_pos = self.GetLength()
194 194 self.current_prompt_line = self.GetCurrentLine()
195 wx.Yield()
196 195 self.EnsureCaretVisible()
197 196
198 197
@@ -144,6 +144,9 b' class WxController(ConsoleWidget, PrefilterFrontEnd):'
144 144 ConsoleWidget.__init__(self, parent, id, pos, size, style)
145 145 PrefilterFrontEnd.__init__(self, **kwds)
146 146
147 # Stick in our own raw_input:
148 self.ipython0.raw_input = self.raw_input
149
147 150 # Marker for complete buffer.
148 151 self.MarkerDefine(_COMPLETE_BUFFER_MARKER, stc.STC_MARK_BACKGROUND,
149 152 background=_COMPLETE_BUFFER_BG)
@@ -166,6 +169,8 b' class WxController(ConsoleWidget, PrefilterFrontEnd):'
166 169 # Inject self in namespace, for debug
167 170 if self.debug:
168 171 self.shell.user_ns['self'] = self
172 # Inject our own raw_input in namespace
173 self.shell.user_ns['raw_input'] = self.raw_input
169 174
170 175
171 176 def raw_input(self, prompt):
@@ -298,9 +303,9 b' class WxController(ConsoleWidget, PrefilterFrontEnd):'
298 303 PrefilterFrontEnd.save_output_hooks(self)
299 304
300 305 def capture_output(self):
301 __builtin__.raw_input = self.raw_input
302 306 self.SetLexer(stc.STC_LEX_NULL)
303 307 PrefilterFrontEnd.capture_output(self)
308 __builtin__.raw_input = self.raw_input
304 309
305 310
306 311 def release_output(self):
General Comments 0
You need to be logged in to leave comments. Login now