List of modules available for import inside Python?

Jason Scheirer jason.scheirer at gmail.com
Thu Aug 28 14:23:01 EDT 2008


On Aug 27, 11:04 pm, Fredrik Lundh <fred... at pythonware.com> wrote:
> ssecorp wrote:
> > Is there a way to view all the modules I have available for import
> > from within Python?
> > Like writing in the interpreter:
> > import.modules
>
> there's a helper script in the 2.5 source code kit that locates all
> existing standard modules:
>
> http://svn.python.org/projects/python/tags/r252/Doc/tools/listmodules.py
>
> to get all modules, remove the for-loop that follows after the comment
> "get rid of site packages".
>
> also see:
>
> http://effbot.org/zone/listmodules-cgi.htm
>
> </F>

I like to direct new users to pydoc's built-in HTTP server:

import pydoc
pydoc.gui()
(then click the 'open browser' button)



More information about the Python-list mailing list