Created
December 4, 2017 09:44
-
-
Save andrzejnovak/2d8f90f614e1c9ca2520a8cdfe7d5fde to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## My helper python functions | |
def make_dirs(dirname): | |
""" | |
Ensure that a named directory exists; if it does not, attempt to create it. | |
""" | |
try: | |
os.makedirs(dirname) | |
except OSError, e: | |
if e.errno != errno.EEXIST: | |
raise |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment