Detect file existance before open?
ayinger1 at my-deja.com
Wed Nov 10 04:51:48 CET 1999
will also work.
> import commands
> In article <380c92a7.412580789 at 184.108.40.206>,
> jlj at cfdrc.com (Lyle Johnson) wrote:
> > os.path.exists(filename)
> > On Sat, 16 Oct 1999 21:06:07 -0600, "Bill Rodgers" <Bill at nospam.com>
> > wrote:
> > >I would like to check for the existance of a file before I attempt
> > >and maybe throw an exception. I don't see a way to do this. I
> > >to tell the user that the file he specified doesn't exist. Is
> a way
> > >to do this or do I need to catch the exception and deal with it
> > >Thanks,
> > >--
> > >Bill Rodgers
> > >Enterprise Management Consultant
> > >Specialty: BMC/Patrol
> > >brodg1 at ix.netcom.com
> > >
> > >
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Sent via Deja.com http://www.deja.com/
Before you buy.
More information about the Python-list