I have been trying to do something like this:

f = open('someDocs.str', 'r')
try:
    while True:
        ln = f.readline()
except EOFError:
    print 'reached eof'
    f.close()
    sys.exit(1)


However, EOFError is never raised. What am I missing? 
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to