def _expand_glob_path(file_roots):
 unglobbed_path = []
 for path in file_roots:
  try:
   if glob.has_magic(path):
    unglobbed_path.extend(glob.glob(path))
   else:
    unglobbed_path.append(path)
  except Exception:
   unglobbed_path.append(path)
 return unglobbed_path

def _expand_glob_path ( file_roots ) : unglobbed_path = [ ] for path in file_roots : try : if glob . has_magic ( path ) : unglobbed_path . extend ( glob . glob ( path ) ) else : unglobbed_path . append ( path ) except Exception : unglobbed_path . append ( path ) return unglobbed_path
applies shell globbing to a set of directories and returns the expanded paths .