On Jun 7, 3:33 pm, alexteo21 <[EMAIL PROTECTED]> wrote: > I have created a script using python that will batch process data > files every hour > The script is running on Solaris. Python version 2.3.3 > > t=open(filename,'rb') > data=t.read() > #processing data... > t.close()
Try the following approach: t=open(filename,'rb') try: data=t.read() #processing data... finally: t.close() and see if that improves matters. If you want to add logging for a quick check, then... import logging t=open(filename,'rb') try: data=t.read() #processing data... except: logging.exception("Failed to process file %r", filename) finally: t.close() Regards, Vinay Sajip -- http://mail.python.org/mailman/listinfo/python-list