List of modules available for import inside Python?

denisbz at t-online.de denisbz at t-online.de
Wed Sep 10 12:52:09 CEST 2008


> > A quick fix is to replace line 1854 in pydoc.py (ModuleScanner.run) with
> > this one:
>
> >         for importer, modname, ispkg in
> >         pkgutil.walk_packages(onerror=lambda name:None):
>
> > (the onerror argument makes it to ignore all errors)

well not all, for example
GLUT: Fatal Error in summon: could not open display: :0.0

So to refine the question:
   how can I list all modules that might be importable on my system,
   without actually importing them all ?

(How about a "pydoc2" that's well thought out, doesn't crash ...
let me ask more knowledgable people, what's a good small help system
as model ?
)

cheers
  -- denis




More information about the Python-list mailing list