In Python 3.2 and above, you can use:
os.makedirs(path, exist_ok=True)
to avoid getting an exception if the directory already exists. This will still raise an exception if path
exists and is not a directory.
In Python 3.2 and above, you can use:
os.makedirs(path, exist_ok=True)
to avoid getting an exception if the directory already exists. This will still raise an exception if path
exists and is not a directory.