A RetroSearch Logo

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

Search Query:

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

[Python-Dev] mkdir -p in python

[Python-Dev] mkdir -p in python [Python-Dev] mkdir -p in pythonClinton Roy clinton.roy at gmail.com
Wed Jul 21 10:11:44 CEST 2010
Hey folks,

On 21 July 2010 10:37, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> Steven D'Aprano wrote:
>>
>> Perhaps all we need is a recipe in the docs:
>>
>> try:
>>    os.makedirs(path)
>> except OSError, e:
>>    if e.errno != 17:
>>        raise
>
> I don't like writing code that depends on particular
> errno values, because I don't trust it to work cross-
> platform.

I use errno.EEXIST instead of a magic number.

later,
-- 
Clinton Roy
Software Engineer
Global Change Institute
University of Queensland

humbug.org.au  - Brisbane Unix Group
clintonroy.wordpress.com - Blog
flickr.com/photos/croy/ - Photos
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