fileinput-like module with a strength for writing filters.
Project description
filterinput is like fileinput but with a few changes to make it easier to write filters. It holds a few recent values like the last line or last regex match to overcome Python’s lack of assignment in conditionals and to make filter code a little cleaner.