[Python-Dev] mkdir -p in python (original) (raw)
Clinton Roy clinton.roy at gmail.com
Wed Jul 21 10:11:44 CEST 2010
- Previous message: [Python-Dev] mkdir -p in python
- Next message: [Python-Dev] mkdir -p in python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: [Python-Dev] mkdir -p in python
- Next message: [Python-Dev] mkdir -p in python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]