-   Programming (
-   -   listing python modules (

southsibling 10-08-2005 11:28 AM

listing python modules
in the python interpreter, I'm attempting (too successfully!) to access a list of modules with the command "help('modules')". What happens is, I get the entire list of 237,419 modules...or however many there are. I can't really tell, because only the last page of the listing survives. There is not the equivalent of bash's "| less" command to allow pagination (so that I can peruse the entire list).

So...what to do?

taylor_venable 10-08-2005 10:07 PM

Python Modules
How about executing the following from your shell:

$ python -c 'help("modules")' | less

southsibling 10-09-2005 12:53 AM

Re: Python Modules

Originally posted by taylor_venable
How about executing the following from your shell:

$ python -c 'help("modules")' | less

Pretty close...

Wasn't right on, but it started me searching thru, etc., etc. which I've been doing for the last coupla hours...getting more engrossed-and less sleep-all the while. Your comments really started the ball rolling.

Anyway, here's the right answer...from the command line:

$ pydoc modules | less

It's really that simple. From there, I can return to the python interpreter (>>>) and invoke the 'help' engines to exhibit the detail I want re any module. But now I am able to display, with pagenation, the modules that actually exist in my system (I figured that was more 'real time' than locating some catch-all list available on the web. BTW, the Vaults of Parnassus (sic) wasn't as much help as I hoped they would be-at least not for what I needed).

Thanks for time and input!

All times are GMT -5. The time now is 08:18 PM.