Show More
@@ -4,7 +4,7 b' from PyQt4 import QtCore, QtGui' | |||||
4 | import zmq |
|
4 | import zmq | |
5 |
|
5 | |||
6 | # Local imports |
|
6 | # Local imports | |
7 |
from IPython.core. |
|
7 | from IPython.core.inputsplitter import InputSplitter | |
8 | from call_tip_widget import CallTipWidget |
|
8 | from call_tip_widget import CallTipWidget | |
9 | from completion_lexer import CompletionLexer |
|
9 | from completion_lexer import CompletionLexer | |
10 | from console_widget import HistoryConsoleWidget |
|
10 | from console_widget import HistoryConsoleWidget | |
@@ -60,11 +60,11 b' class FrontendWidget(HistoryConsoleWidget):' | |||||
60 | self._prompt = '>>> ' |
|
60 | self._prompt = '>>> ' | |
61 |
|
61 | |||
62 | # FrontendWidget protected variables. |
|
62 | # FrontendWidget protected variables. | |
63 | self._blockbreaker = BlockBreaker(input_mode='replace') |
|
|||
64 | self._call_tip_widget = CallTipWidget(self) |
|
63 | self._call_tip_widget = CallTipWidget(self) | |
65 | self._completion_lexer = CompletionLexer(PythonLexer()) |
|
64 | self._completion_lexer = CompletionLexer(PythonLexer()) | |
66 | self._hidden = True |
|
65 | self._hidden = True | |
67 | self._highlighter = FrontendHighlighter(self) |
|
66 | self._highlighter = FrontendHighlighter(self) | |
|
67 | self._input_splitter = InputSplitter(input_mode='replace') | |||
68 | self._kernel_manager = None |
|
68 | self._kernel_manager = None | |
69 |
|
69 | |||
70 | self.document().contentsChange.connect(self._document_contents_change) |
|
70 | self.document().contentsChange.connect(self._document_contents_change) | |
@@ -128,14 +128,14 b' class FrontendWidget(HistoryConsoleWidget):' | |||||
128 | shown. Returns whether the source executed (i.e., returns True only |
|
128 | shown. Returns whether the source executed (i.e., returns True only | |
129 | if no more input is necessary). |
|
129 | if no more input is necessary). | |
130 | """ |
|
130 | """ | |
131 |
self._ |
|
131 | self._input_splitter.push(source) | |
132 |
executed = self._ |
|
132 | executed = not self._input_splitter.push_accepts_more() | |
133 | if executed: |
|
133 | if executed: | |
134 | self.kernel_manager.xreq_channel.execute(source) |
|
134 | self.kernel_manager.xreq_channel.execute(source) | |
135 | self._hidden = hidden |
|
135 | self._hidden = hidden | |
136 | else: |
|
136 | else: | |
137 | self._show_continuation_prompt() |
|
137 | self._show_continuation_prompt() | |
138 |
self.appendPlainText(' ' * self._ |
|
138 | self.appendPlainText(' ' * self._input_splitter.indent_spaces) | |
139 | return executed |
|
139 | return executed | |
140 |
|
140 | |||
141 | def execute_file(self, path, hidden=False): |
|
141 | def execute_file(self, path, hidden=False): |
General Comments 0
You need to be logged in to leave comments.
Login now