Print all the one-line module summaries that contain a substring.
(key)
| 2317 | completer() |
| 2318 | |
| 2319 | def apropos(key): |
| 2320 | """Print all the one-line module summaries that contain a substring.""" |
| 2321 | def callback(path, modname, desc): |
| 2322 | if modname[-9:] == '.__init__': |
| 2323 | modname = modname[:-9] + ' (package)' |
| 2324 | print(modname, desc and '- ' + desc) |
| 2325 | def onerror(modname): |
| 2326 | pass |
| 2327 | with warnings.catch_warnings(): |
| 2328 | warnings.filterwarnings('ignore') # ignore problems during import |
| 2329 | ModuleScanner().run(callback, key, onerror=onerror) |
| 2330 | |
| 2331 | # --------------------------------------- enhanced web browser interface |
| 2332 |
no test coverage detected