How do I check for EOF in Python? I found a bug in my code where the last block of text after the separator isn\'t added to the return list. Or maybe there\'s a better way of ex
This is a fast way to see if you have an empty file:
if f.read(1) == '': print "EOF" f.close()