Print all the one-line module summaries that contain a substring.
(key)
| 2365 | completer() |
| 2366 | |
| 2367 | def 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 |
no test coverage detected