> -----Original Message----- > From: Tutor [mailto:tutor-bounces+crk=godblessthe...@python.org] On > Behalf Of Laura Creighton > Sent: Saturday, August 15, 2015 2:49 PM > To: boB Stepp <robertvst...@gmail.com> > Cc: l...@openend.se; tutor <tutor@python.org> > Subject: Re: [Tutor] try and file existence > > In a message of Sat, 15 Aug 2015 14:24:21 -0500, boB Stepp writes: > >I understand your points, but wonder then what is the intended use for > >os.path.exists()? That is, in what types of circumstances would it be > >both appropriate and safe to use? > > > >boB > > If you want to locate dangling symlinks, os.path.exists will return False, so > the symlink is there, but the file it pointed to is long gone.
Can't you do that with os.path.open() and get a value in os.path.status? (I think that is the thing to call) crk > > Laura > > _______________________________________________ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > https://mail.python.org/mailman/listinfo/tutor _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor