This script provides a class called LineIterator that iterates over every line in a list of files, performing the basic functionality as fileinput module in the standard librarne in a list of files, performing the basic functionality as fileinput module in the standard library (which mimics Perl’s <> operator). Basically acts as a simple and methodical way to iterate over every line in a list of files. If no files are specified at instance creation, then sys.argv[1:] is used. If that is empty, then sys.stdin is used.sys.stdin can be specified in the list of files by listing ‘-’ as a file.
Lacking functionality, compared to the fileinput module, is in-place editing and subsequently backup. The module functions that are included in fileinput are left out here for space concerns. readline() has also been left out since the generator can just have its .next() method called. the gene;
Download from: Homepage