Show More
@@ -104,7 +104,7 b' class TerminalInteractiveShell(InteractiveShell):' | |||||
104 | _pt_app = None |
|
104 | _pt_app = None | |
105 |
|
105 | |||
106 | simple_prompt = Bool(_use_simple_prompt, |
|
106 | simple_prompt = Bool(_use_simple_prompt, | |
107 |
help="""Use `raw_input` for the REPL, without completion |
|
107 | help="""Use `raw_input` for the REPL, without completion and prompt colors. | |
108 |
|
108 | |||
109 | Useful when controlling IPython as a subprocess, and piping STDIN/OUT/ERR. Known usage are: |
|
109 | Useful when controlling IPython as a subprocess, and piping STDIN/OUT/ERR. Known usage are: | |
110 | IPython own testing machinery, and emacs inferior-shell integration through elpy. |
|
110 | IPython own testing machinery, and emacs inferior-shell integration through elpy. | |
@@ -221,7 +221,14 b' class TerminalInteractiveShell(InteractiveShell):' | |||||
221 | # Fall back to plain non-interactive output for tests. |
|
221 | # Fall back to plain non-interactive output for tests. | |
222 | # This is very limited, and only accepts a single line. |
|
222 | # This is very limited, and only accepts a single line. | |
223 | def prompt(): |
|
223 | def prompt(): | |
224 | return cast_unicode_py2(input('In [%d]: ' % self.execution_count)) |
|
224 | isp = self.input_splitter | |
|
225 | prompt_text = "".join(x[1] for x in self.prompts.in_prompt_tokens()) | |||
|
226 | prompt_continuation = "".join(x[1] for x in self.prompts.continuation_prompt_tokens()) | |||
|
227 | while isp.push_accepts_more(): | |||
|
228 | line = cast_unicode_py2(input(prompt_text)) | |||
|
229 | isp.push(line) | |||
|
230 | prompt_text = prompt_continuation | |||
|
231 | return isp.source_reset() | |||
225 | self.prompt_for_code = prompt |
|
232 | self.prompt_for_code = prompt | |
226 | return |
|
233 | return | |
227 |
|
234 |
General Comments 0
You need to be logged in to leave comments.
Login now