Getting a list of all modules
Akira Li
4kir4.1i at gmail.com
Thu Jul 31 14:55:34 EDT 2014
Steven D'Aprano <steve at pearwood.info> writes:
> I'm looking for a programmatic way to get a list of all Python modules
> and packages. Not just those already imported, but all those which
> *could* be imported.
...
> Is this problem already solved? Can anyone make any suggestions?
Look at how `help('modules')` is implemented. Though it crashes on my
system.
See also,
How can I get a list of locally installed Python modules? [1]
python - get available modules [2]
[1]
http://stackoverflow.com/questions/739993/how-can-i-get-a-list-of-locally-installed-python-modules
[2]
http://stackoverflow.com/questions/3952513/python-get-available-modules
--
Akira
More information about the Python-list
mailing list