In <[EMAIL PROTECTED]>, KraftDiner wrote: >> > f.eof() isn't implmented. >> > >> > How can I implement its functionallity? >> >> You don't, generally. >> >> There's probably a better, "more Pythonic" way to accomplish >> your goal, but you're going to have to tell us what it is. >> > > how about?!: > > def eof(fileobj): > curloc = fileobj.tell() > ofloc = fileobj.seek(0,2) > fileobj.seek(curloc, 0) > if ofloc >= curloc: > return True > return False
Works only for files that support `tell()` and `seek()`. What's your use case for `eof()`? Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list