A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-July/102068.html below:

[Python-Dev] mkdir -p in python

[Python-Dev] mkdir -p in python [Python-Dev] mkdir -p in pythonRay Allen ysj.ray at gmail.com
Mon Jul 19 10:49:26 CEST 2010
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>
More information about the Python-Dev mailing list

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