(args, lines)
| 32 | |
| 33 | # Generator to give us one line at a time. |
| 34 | def next_line(args, lines): |
| 35 | if lines is None: |
| 36 | lines = fileinput.input(args) |
| 37 | |
| 38 | for i, line in enumerate(lines): |
| 39 | yield i + 1, line.strip() |
| 40 | |
| 41 | |
| 42 | # Class definitions, to keep things classy |