Show More
@@ -26,7 +26,7 b' from console_widget import ConsoleWidget' | |||
|
26 | 26 | import re |
|
27 | 27 | |
|
28 | 28 | import IPython |
|
29 |
from IPython.kernel. |
|
|
29 | from IPython.kernel.core.interpreter import Interpreter | |
|
30 | 30 | from IPython.frontend.frontendbase import FrontEndBase |
|
31 | 31 | |
|
32 | 32 | #------------------------------------------------------------------------------- |
@@ -59,7 +59,7 b' class IPythonWxController(FrontEndBase, ConsoleWidget):' | |||
|
59 | 59 | """ Create Shell instance. |
|
60 | 60 | """ |
|
61 | 61 | ConsoleWidget.__init__(self, parent, id, pos, size, style) |
|
62 |
FrontEndBase.__init__(self, |
|
|
62 | FrontEndBase.__init__(self, shell=Interpreter(), | |
|
63 | 63 | ) |
|
64 | 64 | |
|
65 | 65 | # FIXME: Something is wrong with the history, I instanciate it |
@@ -67,7 +67,7 b' class IPythonWxController(FrontEndBase, ConsoleWidget):' | |||
|
67 | 67 | self.lines = {} |
|
68 | 68 | |
|
69 | 69 | # Start the IPython engine |
|
70 | self.engine.startService() | |
|
70 | self.shell | |
|
71 | 71 | |
|
72 | 72 | # Capture Character keys |
|
73 | 73 | self.Bind(wx.EVT_KEY_DOWN, self._on_key_down) |
@@ -77,12 +77,6 b' class IPythonWxController(FrontEndBase, ConsoleWidget):' | |||
|
77 | 77 | % IPython.__version__ |
|
78 | 78 | |
|
79 | 79 | |
|
80 | def appWillTerminate_(self, notification): | |
|
81 | """appWillTerminate""" | |
|
82 | ||
|
83 | self.engine.stopService() | |
|
84 | ||
|
85 | ||
|
86 | 80 | def complete(self, token): |
|
87 | 81 | """Complete token in engine's user_ns |
|
88 | 82 | |
@@ -96,7 +90,7 b' class IPythonWxController(FrontEndBase, ConsoleWidget):' | |||
|
96 | 90 | IPython.kernel.engineservice.IEngineBase.complete |
|
97 | 91 | """ |
|
98 | 92 | |
|
99 |
return self. |
|
|
93 | return self.shell.complete(token) | |
|
100 | 94 | |
|
101 | 95 | |
|
102 | 96 | def render_result(self, result): |
@@ -162,7 +156,7 b' class IPythonWxController(FrontEndBase, ConsoleWidget):' | |||
|
162 | 156 | or re.findall(r"\n[\t ]*$", cleaned_buffer)): |
|
163 | 157 | if self.is_complete(cleaned_buffer): |
|
164 | 158 | self._add_history(None, cleaned_buffer.rstrip()) |
|
165 |
result = self. |
|
|
159 | result = self.shell.execute(cleaned_buffer) | |
|
166 | 160 | self.render_result(result) |
|
167 | 161 | self.new_prompt(self.prompt % (result['number'] + 1)) |
|
168 | 162 | self.multi_line_input = False |
|
1 | NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now