KraftDiner wrote:

> how about?!:
> 
> def eof(fileobj):
>    curloc = fileobj.tell()
>    ofloc = fileobj.seek(0,2)
>    fileobj.seek(curloc, 0)
>    if ofloc >= curloc:
>       return True
>    return False

this doesn't work with text files on platforms that translates line 
endings, it doesn't work with streams, it's not very efficient, and as 
written, it doesn't work at all.  and it's entirely pointless, since you 
need to check the return value from "read" anyway.

</F>

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to