Skip to content

Instantly share code, notes, and snippets.

@seanh
Created February 4, 2011 01:26
Show Gist options
  • Select an option

  • Save seanh/810581 to your computer and use it in GitHub Desktop.

Select an option

Save seanh/810581 to your computer and use it in GitHub Desktop.
Python: create a directory if it doesn't already exist.
if not os.path.isdir('somedir/'):
os.mkdir('somedir/')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment