def pathMatchPatterns(path, repos):
 for repo in repos:
  if fnmatch(path, repo):
   return True
 return False

def pathMatchPatterns ( path , repos ) : for repo in repos : if fnmatch ( path , repo ) : return True return False
check existence of given path against list of path patterns the pattern definition is the as fnmatch .