[Tutor] Re: Testing For EOF?

Emile van Sebille emile@fenx.com
Sat, 12 Oct 2002 00:14:27 -0700


<James.Rocks@equant.com> asks:
> Does anyone know an easy way to test for the end of a file?
> 

while 1:
    rec = filehandle.read()
    if not rec: break

HTH,
 
--

Emile van Sebille
emile@fenx.com

---------