a document I would like to see...

M

Mark Harrison

A text file containing one-line summaries of everything in
the standard library, including module name.

Then I could do things like this:

grep dircmp # what module is dircmp in?
grep sort # what are my options for sorting?
grep print | grep -v xmllib # what can print, ignoring xmllib?

Any such thing exist?

Many TIA!
Mark
 
S

Skip Montanaro

Mark> A text file containing one-line summaries of everything in the
Mark> standard library, including module name.

Mark> Then I could do things like this:

Mark> grep dircmp # what module is dircmp in?
Mark> grep sort # what are my options for sorting?
Mark> grep print | grep -v xmllib # what can print, ignoring xmllib?

Mark> Any such thing exist?

What do you have in mind format-wise? Note that most modules and packages
are sufficiently complex that trying to jam the entire api into a one-line
summary is going to provide fairly meaningless output. Bop on over to your
local HTML lib docs and try

egrep -l dircmp *.html

On a 2.2.3 system I see

contents.html
dircmp-objects.html
genindex.html
index.html
lib.html
module-filecmp.html
module-popen2.html
obsolete-modules.html

Restricting to *module*.html helps. "sort" is even worse:

% egrep -l sort *module*.html
module-bisect.html
module-difflib.html
module-email.Message.html
module-formatter.html
module-gdbm.html
module-locale.html
module-profile.html
module-smtplib.html
module-Tix.html
module-xml.dom.html
module-xmllib.html

I realize that's not quite what you were asking. If you could provide a
more detailed example perhaps someone can make some more on-target
suggestions.

Skip
 
P

Phil Frost

Well, pydoc.org had a search feature, but it's been "temporarily
disabled" for a long time now.
 
S

Skip Montanaro

Phil> Well, pydoc.org had a search feature, but it's been "temporarily
Phil> disabled" for a long time now.

Patches cheerfully accepted. <0.5 wink>

Skip
 
S

Simon Dahlbacka

Mark said:
A text file containing one-line summaries of everything in
the standard library, including module name.

Then I could do things like this:

grep dircmp # what module is dircmp in?
grep sort # what are my options for sorting?
grep print | grep -v xmllib # what can print, ignoring xmllib?

Any such thing exist?

Many TIA!
Mark
are you aware of http://rgruet.free.fr/PQR2.3.html ?
 
P

Paramjit Oberoi

Use CHM docs (available with the windows installer).
You still wouldn't be able to grep, but you would have
a sorted index of headings, as well as full-text search
capability.

I use xchm (xchm.sourceforge.net) as my CHM reader on Linux.
There is also GnoCHM (gnochm.sourceforge.net) which is written
in Python itself, but I've had stability problems with that one.

-param
 
M

Mark Harrison

Skip Montanaro said:
Mark> A text file containing one-line summaries of everything in the
Mark> standard library, including module name.

Mark> Then I could do things like this:

Mark> grep dircmp # what module is dircmp in?
Mark> grep sort # what are my options for sorting?
Mark> grep print | grep -v xmllib # what can print, ignoring xmllib?

Mark> Any such thing exist?

What do you have in mind format-wise?

Ideally it would be something like this:

filecmp cmp(f1, f2[, shallow[, use_statcache]])
filecmp cmpfiles(dir1, dir2, common[, shallow[, use_statcache]])
filecmp class dircmp(a, b[, ignore[, hide]])
popen2 popen2(cmd[, bufsize[, mode]])
popen2 popen3(cmd[, bufsize[, mode]]
popen2 popen4(cmd[, bufsize[, mode]])
popen2 class Popen3(cmd[, capturestderr[, bufsize]])
popen2 class Popen4(cmd[, bufsize])
Note that most modules and packages
are sufficiently complex that trying to jam the entire api into a one-line
summary is going to provide fairly meaningless output. Bop on over to your
local HTML lib docs and try

egrep -l dircmp *.html

Right. Most of these hits (all except for one, in fact) are hits
that I would like to avoid, just receiving the dircmp line above.
I realize that's not quite what you were asking. If you could provide a
more detailed example perhaps someone can make some more on-target
suggestions.

Basically, I would like to make quick queries like this:

"What functions in the library do sorting?"
"What module is sleep() in?"
"What functions are in module re?"
"What are the parameters to dircmp?"

I usually just search lib.pdf, but this has a couple of disadvantages:

- opening the pdf takes a small amount of time
- skipping over all the places "sleep" occurs in text
- when I find sleep() on pg 246, I have to visually
scan up to page 244 to see that the section header
for "time".
- I'm not sure if some other module has something
name *sleep* that might also be handy.
- I don't see sleep() "in context"

Overall the python docs are excellent. I guess what I'm searching
for is a very targeted index of modules and functions that can
be searched by the usual command line text tools.

Thanks,
Mark
 
D

David Stanek

Phil> Well, pydoc.org had a search feature, but it's been "temporarily
Phil> disabled" for a long time now.

Patches cheerfully accepted. <0.5 wink>

I'd be happy to, were can I find the search.cgi code?

--
David Stanek (roninds)
(e-mail address removed)
http://roninds.homelinux.net

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBCk/NkuI+AGJy7a8RAqleAJ41LE0JaO/Q6CgkidYsS73cuIS6CwCfe3zp
5Az4AB5kb7d/pHRwaNA66Og=
=6Bug
-----END PGP SIGNATURE-----
 
S

Skip Montanaro

Phil> Well, pydoc.org had a search feature, but it's been "temporarily
Phil> disabled" for a long time now.
David> I'd be happy to, were can I find the search.cgi code?

Ah, mea culpa. I read too fast and missed the ".org" and only saw "pydoc".
"pydoc.org" is managed by Ka-Ping Yee, the pydoc module author. That the
search function is disabled probably has little, if anything, to do with
functional breakage and more to do with lack of necessary resources to run
the service (personal time to manage the service, cpu power, bandwidth,
etc).

Skip
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top