Detect file existance before open?

greg andruk meowing at banet.net
Sat Oct 16 23:23:09 EDT 1999


In nnmh:python, Bill Rodgers <Bill at nospam.com> wrote:

> I would like to check for the existance of a file before I attempt an open
> and maybe throw an exception.  I don't see a way to do this.

os.stat() will do the job.




More information about the Python-list mailing list