MCPcopy Index your code
hub / github.com/ipython/ipython / prompt

Method prompt

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

Source from the content-addressed store, hash-verified

787 # Fall back to plain non-interactive output for tests.
788 # This is very limited.
789 def prompt():
790 prompt_text = "".join(x[1] for x in self.prompts.in_prompt_tokens())
791 lines = [input(prompt_text)]
792 prompt_continuation = "".join(
793 x[1] for x in self.prompts.continuation_prompt_tokens()
794 )
795 while self.check_complete("\n".join(lines))[0] == "incomplete":
796 lines.append(input(prompt_continuation))
797 return "\n".join(lines)
798
799 self.prompt_for_code = prompt
800 return

Callers 2

_promptMethod · 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