Why is "while" ticking me off???

Greg Jorgensen gregj at pobox.com
Fri Oct 6 17:12:47 EDT 2000


The fileinput module creates iterators:

import fileinput
...
fi = fileinput.input('filename')
for line in fi:
    print line

You can iterate over standard input, a list of files, etc. There are other
handy methods. Check it out.

--
Greg Jorgensen
Deschooling Society
Portland, Oregon, USA
gregj at pobox.com






More information about the Python-list mailing list