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

Pauli Virtanen pav@iki...
Mon Jun 28 10:18:37 CDT 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