Show More
@@ -72,6 +72,8 b' class PrefilterFrontEnd(LineFrontEndBase):' | |||||
72 | self.shell.output_trap = SyncOutputTrap(write_out=self.write, |
|
72 | self.shell.output_trap = SyncOutputTrap(write_out=self.write, | |
73 | write_err=self.write) |
|
73 | write_err=self.write) | |
74 |
|
74 | |||
|
75 | import pydoc | |||
|
76 | pydoc.help.output = self.shell.output_trap.out | |||
75 |
|
77 | |||
76 |
|
78 | |||
77 | def prefilter_input(self, input_string): |
|
79 | def prefilter_input(self, input_string): | |
@@ -114,7 +116,7 b' class PrefilterFrontEnd(LineFrontEndBase):' | |||||
114 | self.__old_stderr= sys.stderr |
|
116 | self.__old_stderr= sys.stderr | |
115 | sys.stdout = Term.cout |
|
117 | sys.stdout = Term.cout | |
116 | sys.stderr = Term.cerr |
|
118 | sys.stderr = Term.cerr | |
117 | # FIXME: I still need to provide the writelines method |
|
119 | ||
118 |
|
120 | |||
119 | def release_output(self): |
|
121 | def release_output(self): | |
120 | """ Release all the different captures we have made, |
|
122 | """ Release all the different captures we have made, |
@@ -181,6 +181,7 b' class WxController(PrefilterFrontEnd, ConsoleWidget):' | |||||
181 | widget handle them, and put our logic afterward. |
|
181 | widget handle them, and put our logic afterward. | |
182 | """ |
|
182 | """ | |
183 | current_line_number = self.GetCurrentLine() |
|
183 | current_line_number = self.GetCurrentLine() | |
|
184 | # Calltips | |||
184 | if event.KeyCode == ord('('): |
|
185 | if event.KeyCode == ord('('): | |
185 | event.Skip() |
|
186 | event.Skip() | |
186 | self.do_calltip() |
|
187 | self.do_calltip() | |
@@ -212,6 +213,7 b' class WxController(PrefilterFrontEnd, ConsoleWidget):' | |||||
212 | new_buffer = self.get_history_next() |
|
213 | new_buffer = self.get_history_next() | |
213 | if new_buffer is not None: |
|
214 | if new_buffer is not None: | |
214 | self.replace_current_edit_buffer(new_buffer) |
|
215 | self.replace_current_edit_buffer(new_buffer) | |
|
216 | # Tab-completion | |||
215 | elif event.KeyCode == ord('\t'): |
|
217 | elif event.KeyCode == ord('\t'): | |
216 | last_line = self.get_current_edit_buffer().split('\n')[-1] |
|
218 | last_line = self.get_current_edit_buffer().split('\n')[-1] | |
217 | if not re.match(r'^\s*$', last_line): |
|
219 | if not re.match(r'^\s*$', last_line): |
General Comments 0
You need to be logged in to leave comments.
Login now