On 14 February 2012 09:59, Wanderer <wande...@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: http://docs.python.org/py3k/library/os.html?highlight=makedirs#os.makedirs Tim Delaney
-- http://mail.python.org/mailman/listinfo/python-list