code: def eglob(path, exclude=None):
      
      fi = itertools.chain.from_iterable
      paths = list(fi(glob2.iglob(d) for d in expand_paths(path)))
      if exclude:
          cached_regex = cached_regices.get(exclude, None)
          if not cached_regex:
              cached_regex = cached_regices[exclude] = re.compile(exclude)
          paths = [x for x in paths if not cached_regex.search(x)]
  
      return paths
docs: Like glob.glob, but supports "/path/**/{a,b,c}.txt" lookup