MCPcopy Index your code
hub / github.com/python/cpython / input

Method input

Lib/_pyrepl/readline.py:369–380  ·  view source on GitHub ↗
(self, prompt: object = "")

Source from the content-addressed store, hash-verified

367 return self.reader
368
369 def input(self, prompt: object = "") -> str:
370 try:
371 reader = self.get_reader()
372 except _error:
373 assert raw_input is not None
374 return raw_input(prompt)
375 prompt_str = str(prompt)
376 reader.ps1 = prompt_str
377 sys.audit("builtins.input", prompt_str)
378 result = reader.readline(startup_hook=self.startup_hook)
379 sys.audit("builtins.input/result", result)
380 return result
381
382 def multiline_input(self, more_lines: MoreLinesCallable, ps1: str, ps2: str) -> str:
383 """Read an input on possibly multiple lines, asking for more

Callers 3

waFunction · 0.45
do_test_call_inputMethod · 0.45

Calls 3

get_readerMethod · 0.95
strFunction · 0.85
readlineMethod · 0.45