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

Function apropos

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

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

(key)

Source from the content-addressed store, hash-verified

2365 completer()
2366
2367def apropos(key):
2368 """Print all the one-line module summaries that contain a substring."""
2369 def callback(path, modname, desc):
2370 if modname[-9:] == '.__init__':
2371 modname = modname[:-9] + ' (package)'
2372 print(modname, desc and '- ' + desc)
2373 def onerror(modname):
2374 pass
2375 with warnings.catch_warnings():
2376 warnings.filterwarnings('ignore') # ignore problems during import
2377 ModuleScanner().run(callback, key, onerror=onerror)
2378
2379# --------------------------------------- enhanced web browser interface
2380

Callers 2

listmodulesMethod · 0.85
cliFunction · 0.85

Calls 2

ModuleScannerClass · 0.85
runMethod · 0.45

Tested by

no test coverage detected