MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / input

Function input

tools/python-3.11.9-amd64/Lib/fileinput.py:78–91  ·  view source on GitHub ↗

Return an instance of the FileInput class, which can be iterated. The parameters are passed to the constructor of the FileInput class. The returned instance, in addition to being an iterator, keeps global state for the functions of this module,.

(files=None, inplace=False, backup="", *, mode="r", openhook=None,
          encoding=None, errors=None)

Source from the content-addressed store, hash-verified

76_state = None
77
78def input(files=None, inplace=False, backup="", *, mode="r", openhook=None,
79 encoding=None, errors=None):
80 """Return an instance of the FileInput class, which can be iterated.
81
82 The parameters are passed to the constructor of the FileInput class.
83 The returned instance, in addition to being an iterator,
84 keeps global state for the functions of this module,.
85 """
86 global _state
87 if _state and _state._file:
88 raise RuntimeError("input() already active")
89 _state = FileInput(files, inplace, backup, mode=mode, openhook=openhook,
90 encoding=encoding, errors=errors)
91 return _state
92
93def close():
94 """Close the sequence."""

Callers 13

__call__Method · 0.85
getlineMethod · 0.85
browseFunction · 0.85
cmdloopMethod · 0.85
raw_inputMethod · 0.85
_testFunction · 0.85
do_clearMethod · 0.85
send_metadataMethod · 0.85
prompt_user_passwdMethod · 0.85
send_metadataMethod · 0.85
inputMethod · 0.85
askFunction · 0.85

Calls 1

FileInputClass · 0.85

Tested by

no test coverage detected