LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 10-08-2005, 12:28 PM   #1
southsibling
Member
 
Registered: Jun 2003
Location: Harford County, Maryland
Distribution: Mandrake 10.1
Posts: 162

Rep: Reputation: 30
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?
 
Old 10-08-2005, 11:07 PM   #2
taylor_venable
Member
 
Registered: Jun 2005
Location: Indiana, USA
Distribution: OpenBSD, Ubuntu
Posts: 892

Rep: Reputation: 41
Python Modules

How about executing the following from your shell:

$ python -c 'help("modules")' | less
 
Old 10-09-2005, 01:53 AM   #3
southsibling
Member
 
Registered: Jun 2003
Location: Harford County, Maryland
Distribution: Mandrake 10.1
Posts: 162

Original Poster
Rep: Reputation: 30
Re: Python Modules

Quote:
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 Python.org, 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!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Python doubt.... regarding reloading modules tuxfood Programming 3 06-09-2005 08:56 AM
Listing kernel modules in a terminal brunnopessoa Fedora 3 10-12-2004 07:58 PM
Listing my installed Kernel Modules. mudelf Linux - General 1 11-06-2003 07:58 AM
Python modules in Superkaramba wakeupbomb Linux - Software 12 08-03-2003 06:55 PM
Re: modprobe: Note: /etc/modules.conf is more recent than lib/modules/2.4.9/modules.d Andy.M Linux - General 1 01-24-2002 02:50 AM


All times are GMT -5. The time now is 08:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration