List of modules available for import inside Python?
Fredrik Lundh
fredrik at pythonware.com
Wed Sep 10 07:45:54 EDT 2008
denisbz at t-online.de wrote:
> how can I list all modules that might be importable on my system,
> without actually importing them all ?
I'm pretty sure I mentioned a way to do that back when this thread was
opened. let's see, yes, here it is:
...
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>
More information about the Python-list
mailing list