def mkdir_p(path):
    '''
    mkdir -p
    http://stackoverflow.com/a/600612/127816
    '''
    try:
        os.makedirs(path)
    except __HOLE__ as exc:  # Python >2.5
        if exc.errno == errno.EEXIST and os.path.isdir(path):
            pass
        else:
            raise
dataset/ETHPy150Open saltstack/salt/salt/netapi/rest_wsgi.py/mkdir_p