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

Method getline

Lib/pydoc.py:2045–2052  ·  view source on GitHub ↗

Read one line, using input() when appropriate.

(self, prompt)

Source from the content-addressed store, hash-verified

2043 self.help(request)
2044
2045 def getline(self, prompt):
2046 """Read one line, using input() when appropriate."""
2047 if self.input is sys.stdin:
2048 return input(prompt)
2049 else:
2050 self.output.write(prompt)
2051 self.output.flush()
2052 return self.input.readline()
2053
2054 def help(self, request, is_cli=False):
2055 if isinstance(request, str):

Callers 1

interactMethod · 0.95

Calls 4

inputFunction · 0.85
writeMethod · 0.45
flushMethod · 0.45
readlineMethod · 0.45

Tested by

no test coverage detected