(self, pattern, exclude = None)
return files
Add a list of files to the current component as specified in the
        glob pattern. Individual files can be excluded in the exclude list.
Add a list of files to the current component as specified in the
        glob pattern. Individual files can be excluded in the exclude list.
Add a list of files to the current component as specified in the glob pattern . Individual files can be excluded in the exclude list .
def glob(self, pattern, exclude = None):
        """Add a list of files to the current component as specified in the
        glob pattern. Individual files can be excluded in the exclude list."""
        try:
            files = os.listdir(self.absolute)
        except OSError:
            return []
        if pattern[:1] != '.':
            files = (f for f in files if f[0] != '.')
        files = fnmatch.filter(files, pattern)
        for f in files:
            if exclude and f in exclude: continue
            self.add_file(f)
        return files
def glob ( self , pattern , exclude = None ) : try : files = os . listdir ( self . absolute ) except OSError : return [ ] if pattern [ : 1 ] != '.' : files = ( f for f in files if f [ 0 ] != '.' ) files = fnmatch . filter ( files , pattern ) for f in files : if exclude and f in exclude : continue self . add_file ( f ) return files