parameters: (self, dir, shadowed=None)
return_statement: return self.bigsection(dir, '#ffffff', '#ee77aa', contents)
docstring: Generate an HTML index for a directory of modules.
docstring_summary: Generate an HTML index for a directory of modules.
docstring_tokens: Generate an HTML index for a directory of modules .
function: 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)
function_tokens: 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 )