Skip to content

Instantly share code, notes, and snippets.

@andrewdyates
Created October 2, 2012 22:57
Show Gist options
  • Save andrewdyates/3823842 to your computer and use it in GitHub Desktop.
Save andrewdyates/3823842 to your computer and use it in GitHub Desktop.
A simple make directory function in Python that I must have copy-pasted 100 times.
#!/usr/bin/python
import os, errno
def make_dir(outdir):
try:
os.makedirs(outdir)
except OSError, e:
if e.errno != errno.EEXIST: raise
return outdir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment