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