Improvement ?
Peter Hansen
peter at engcorp.com
Wed May 5 15:47:18 EDT 2004
Jean-Marc Ranger wrote:
> With Python 2.3.3 for Windows, I understand why
> os.makedirs("C:\SomeDirectoryThatDontExist\.\AnotherDirectory") fails
> throwing an exception saying "OSError: [Errno 17] File exists" - the
> period is like a request to create the same directory a second time.
>
> But is this the expected behavior ? I personaly would prefer to see
> this operation succeed - and don't like the idea of writing a
> workaround :)
Wouldn't using os.path.normpath() on the string first be a
really really easy workaround?
-Peter
More information about the Python-list
mailing list