def exists_or_mkdir(path, verbose=True):
 if (not os.path.exists(path)):
  if verbose:
   print ('[!] Create %s ...' % path)
  os.makedirs(path)
  return False
 else:
  if verbose:
   print ('[*] %s exists ...' % path)
  return True

def exists_or_mkdir ( path , verbose = True ) : if ( not os . path . exists ( path ) ) : if verbose : print ( '[!] Create %s ...' % path ) os . makedirs ( path ) return False else : if verbose : print ( '[*] %s exists ...' % path ) return True
check a directory .