Listing all available (not just loaded) modules
Michael Chermside
mcherm at destiny.com
Wed Jun 19 14:45:09 EDT 2002
> How do I list all available (not just loaded) modules?
Python 2.2.1 (#34, Apr 9 2002, 19:34:33) [MSC 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> modules = []
>>> def addModuleToList( path, moduleName, description ):
... modules.append( moduleName )
...
>>> import pydoc
>>> pydoc.ModuleScanner().run( addModuleToList )
>>> print modules
[... LOTS OF OUTPUT HERE ...]
-- Michael Chermside
More information about the Python-list
mailing list