Unfortunately, this version will loop forever at EOF since
string.splitfields('', '\t') returns [''] which is not false.
Therefore you must use Steven's second solution:
> line = fp.readline()
> if not line : break
> fields = string.splitfields( line, '\t' )
If you want to stop at EOF or a blank line, you could try
if not fields [1:] : break
--Guido van Rossum, CWI, Amsterdam <Guido.van.Rossum@cwi.nl>
<URL:http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>