MCPcopy Index your code
hub / github.com/python/cpython / apropos

Function apropos

Lib/pydoc.py:2271–2281  ·  view source on GitHub ↗

Print all the one-line module summaries that contain a substring.

(key)

Source from the content-addressed store, hash-verified

2269 completer()
2270
2271def apropos(key):
2272 """Print all the one-line module summaries that contain a substring."""
2273 def callback(path, modname, desc):
2274 if modname[-9:] == '.__init__':
2275 modname = modname[:-9] + ' (package)'
2276 print(modname, desc and '- ' + desc)
2277 def onerror(modname):
2278 pass
2279 with warnings.catch_warnings():
2280 warnings.filterwarnings('ignore') # ignore problems during import
2281 ModuleScanner().run(callback, key, onerror=onerror)
2282
2283# --------------------------------------- enhanced web browser interface
2284

Callers 2

listmodulesMethod · 0.85
cliFunction · 0.85

Calls 2

ModuleScannerClass · 0.85
runMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…