[Numpy-discussion] numpy.load raising IOError but EOFError expected

Pauli Virtanen pav at iki.fi
Mon Jun 28 11:18:37 EDT 2010


ke, 2010-06-23 kello 12:46 +0200, Ruben Salvador kirjoitti:
[clip]
> how can I detect the EOF to stop reading

r = f.read(1)
if not r:
    break # EOF
else:
    f.seek(-1, 1)

-- 
Pauli Virtanen




More information about the NumPy-Discussion mailing list