Module list generation

Doug Kearns djkea2 at mugca.its.monash.edu.au
Sun Dec 5 03:05:08 EST 2004


In article <41b0b2e2$1 at nntp0.pdx.net>, Scott David Daniels wrote:
> Doug Kearns wrote:
>> Is this the best/simplest way to generate a module list?
>> 
>> python -c 'from pydoc import help; help("modules")'
>> 
>> Thanks,
>> Doug
> I am not sure if this is what you want, but how about:

I'm updating the zsh completion function for python and need to
generate a list of modules for completing the new '-m' option.

> For python 2.4, try:
> python -c "import sys; print sorted(sys.modules)"

I don't know python, but as I understand it, this only lists _loaded_
modules.

Thanks,
Doug



More information about the Python-list mailing list