Change os.makedirs to handle existing directory
timothy.c.delaney at gmail.com
Tue Feb 14 00:18:58 CET 2012
On 14 February 2012 09:59, Wanderer <wanderer at dialup4less.com> wrote:
> I think wanting to create a directory if one doesn't exist or do
> nothing if it does exist and just use the existing directory is a
> fairly normal programming need. Apparently this is somewhat
> complicated in Python.
> IMHO, os.makedirs should do this for you with something like
> os.makedirs(dirName, exist = False)
> and have makedirs silence the error the 'right' way whatever that is,
> without turning it into an exercise for the user.
Added in 3.2:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list