open function fail after running a day

Vinay Sajip vinay_sajip at yahoo.co.uk
Thu Jun 7 14:21:55 EDT 2007


Try the following:

import logging

t=open(filename,'rb')
try:
    data=t.read()
    #processing data...
except:
    logging.exception("Failed to process %r", filename)
finally:
    t.close()







More information about the Python-list mailing list