def ensuredir(path):
 try:
  os.makedirs(path)
 except OSError as err:
  if (not (err.errno == 17)):
   raise

def ensuredir ( path ) : try : os . makedirs ( path ) except OSError as err : if ( not ( err . errno == 17 ) ) : raise
ensure that a path exists .