(self, dir, shadowed=None)
return self.bigsection(dir, '#ffffff', '#ee77aa', contents)
Generate an HTML index for a directory of modules.
Generate an HTML index for a directory of modules.
Generate an HTML index for a directory of modules .
def index(self, dir, shadowed=None):
        """Generate an HTML index for a directory of modules."""
        modpkgs = []
        if shadowed is None: shadowed = {}
        for importer, name, ispkg in pkgutil.iter_modules([dir]):
            if any((0xD800 <= ord(ch) <= 0xDFFF) for ch in name):
                # ignore a module if its name contains a surrogate character
                continue
            modpkgs.append((name, '', ispkg, name in shadowed))
            shadowed[name] = 1

        modpkgs.sort()
        contents = self.multicolumn(modpkgs, self.modpkglink)
        return self.bigsection(dir, '#ffffff', '#ee77aa', contents)
def index ( self , dir , shadowed = None ) : modpkgs = [ ] if shadowed is None : shadowed = { } for importer , name , ispkg in pkgutil . iter_modules ( [ dir ] ) : if any ( ( 0xD800 <= ord ( ch ) <= 0xDFFF ) for ch in name ) : # ignore a module if its name contains a surrogate character continue modpkgs . append ( ( name , '' , ispkg , name in shadowed ) ) shadowed [ name ] = 1 modpkgs . sort ( ) contents = self . multicolumn ( modpkgs , self . modpkglink ) return self . bigsection ( dir , '#ffffff' , '#ee77aa' , contents )