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

Function pseudo_input

IPython/core/tests/test_inputsplitter.py:58–66  ·  view source on GitHub ↗

Return a function that acts like raw_input but feeds the input list.

(lines)

Source from the content-addressed store, hash-verified

56
57
58def pseudo_input(lines):
59 """Return a function that acts like raw_input but feeds the input list."""
60 ilines = iter(lines)
61 def raw_in(prompt):
62 try:
63 return next(ilines)
64 except StopIteration:
65 return ''
66 return raw_in
67
68#-----------------------------------------------------------------------------
69# Tests

Callers 1

check_nsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected