PyDocs

Nav

Command-line interface libraries

input

fileinput

function (source)
  • input(files=None, inplace=False, backup='', *, mode='r', openhook=None, encoding=None, errors=None)
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,.
Changed in 3.2, 3.8, 3.10
  • 3.2: Can be used as a context manager.
  • 3.8: The keyword parameters mode and openhook are now keyword-only.
  • 3.10: The keyword-only parameter encoding and errors are added.
0 Examples
No examples for fileinput/input.
See Also
No see-alsos for fileinput/input
0 Notes
No notes for input