MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / index

Method index

tools/python-3.11.9-amd64/Lib/pydoc.py:1168–1181  ·  view source on GitHub ↗

Generate an HTML index for a directory of modules.

(self, dir, shadowed=None)

Source from the content-addressed store, hash-verified

1166 return lhs + self.repr(object)
1167
1168 def index(self, dir, shadowed=None):
1169 """Generate an HTML index for a directory of modules."""
1170 modpkgs = []
1171 if shadowed is None: shadowed = {}
1172 for importer, name, ispkg in pkgutil.iter_modules([dir]):
1173 if any((0xD800 <= ord(ch) <= 0xDFFF) for ch in name):
1174 # ignore a module if its name contains a surrogate character
1175 continue
1176 modpkgs.append((name, '', ispkg, name in shadowed))
1177 shadowed[name] = 1
1178
1179 modpkgs.sort()
1180 contents = self.multicolumn(modpkgs, self.modpkglink)
1181 return self.bigsection(dir, 'index', contents)
1182
1183# -------------------------------------------- text documentation generator
1184

Callers 15

patternMethod · 0.45
_strptimeFunction · 0.45
_newFunction · 0.45
disFunction · 0.45
_replace_encodingFunction · 0.45
cert_time_to_secondsFunction · 0.45
compiler_fixupFunction · 0.45
html_indexFunction · 0.45
_clearstampMethod · 0.45
expandvarsFunction · 0.45
_getmemberMethod · 0.45
_format_actions_usageMethod · 0.45

Calls 6

multicolumnMethod · 0.95
bigsectionMethod · 0.95
iter_modulesMethod · 0.80
anyFunction · 0.70
appendMethod · 0.45
sortMethod · 0.45

Tested by

no test coverage detected