On 2006-09-28, SpreadTooThin <[EMAIL PROTECTED]> wrote: > f = open('myfile.bin', 'rb') > > How do I know if there was an error opening my file?
Try it an see. Seriously, it will raise an exception that you can catch. try: f = open('myfile.bin', 'rb') # Do stuff with f except IOError, inst: print 'Phooey.', inst.errno, inst.strerror -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list