Creating a function for a directory

Neil Cerutti neilc at norwich.edu
Tue Nov 12 08:42:37 EST 2013


On 2013-11-12, Steven D'Aprano
<steve+comp.lang.python at pearwood.info> wrote:
> Using os.path.exists before opening a file is, for the most
> part, a waste of time.

I use it in conjuction with file creation times to check that I
didn't forget to update/create one of the data files a process
might need.

Since I have to create the data file manually, race conditions
seem unlikely.

-- 
Neil Cerutti



More information about the Python-list mailing list