This module implements a helper class and functions to quickly
write a loop over standard input or a list of files. If you just
want to read or write one file see open(). The typical use is:
import fileinput for line in fileinput.input(): process(line)
This iterates over the lines of all files listed in
sys.argv[1:], defaulting to sys.stdin if the list is empty. If a
filename is '-', it is also replaced by sys.stdin. To specify an
alternative list of filenames, pass it as the first argument to
input(). A single file name is also allowed. All files are
opened in text mode by default, but you can override this by
specifying the mode parameter in the call to input() or
FileInput(). If an I/O error occurs during opening or reading a
file, IOError is raised. If sys.stdin is used more than once,
the second and further use will return no lines, except perhaps
for interactive use, or if it has been explicitly reset (e.g.
using sys.stdin.seek(0)). Empty files are opened and immediately
closed; the only time their pres