See http://bugs.python.org/issue9299 On Mon, Jul 19, 2010 at 1:16 PM, Ray Allen <ysj.ray at gmail.com> wrote: > > Agree. Through searching for existing issues, I found there isn't any such > request. And I will submit one. > > The '-p' option of shell's mkdir has tow functions: > 1, create parents directories if not exists, > 2, suppress "File exists" error if the target has already exists. > What we need is the second function. So I think both os.mkdir() and > os.makedirs() should add a keyword argument to suppress the "OSError: [Errno > 17] File exists". So we can remove many "try...except..." codes surround > os.mkdir() and os.makedirs() as Greg said, "The operation of 'make sure > this directory and all its parents exist' is very commonly required" > > -- > Ray Allen > Best wishes! > -- Ray Allen Best wishes! -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20100719/d5bb8650/attachment.html>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4