MCPcopy Create free account
hub / github.com/ipython/ipython / prompt

Method prompt

IPython/terminal/interactiveshell.py:288–294  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

286 # Fall back to plain non-interactive output for tests.
287 # This is very limited.
288 def prompt():
289 prompt_text = "".join(x[1] for x in self.prompts.in_prompt_tokens())
290 lines = [input(prompt_text)]
291 prompt_continuation = "".join(x[1] for x in self.prompts.continuation_prompt_tokens())
292 while self.check_complete('\n'.join(lines))[0] == 'incomplete':
293 lines.append( input(prompt_continuation) )
294 return '\n'.join(lines)
295 self.prompt_for_code = prompt
296 return
297

Callers 2

in_threadMethod · 0.80
prompt_for_codeMethod · 0.80

Calls 4

inputFunction · 0.90
in_prompt_tokensMethod · 0.45
check_completeMethod · 0.45

Tested by

no test coverage detected