def mkdirp(d, mode=None):
 try:
  if mode:
   os.makedirs(d, mode)
  else:
   os.makedirs(d)
 except OSError as e:
  if (e.errno == errno.EEXIST):
   pass
  else:
   raise

def mkdirp ( d , mode = None ) : try : if mode : os . makedirs ( d , mode ) else : os . makedirs ( d ) except OSError as e : if ( e . errno == errno . EEXIST ) : pass else : raise
recursively create directories on path d .