0
0
mirror of https://github.com/python/cpython.git synced 2024-11-27 23:47:29 +01:00
Commit Graph

1 Commits

Author SHA1 Message Date
Guido van Rossum
7d5b99d8bf A new standard module, as discussed on comp.lang.python, to simplify
the writing of filters.

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 or when a filename is
'-'.

There is also an option to use this to direct the output back to the
input files.
1997-11-21 17:12:59 +00:00