469,352 Members | 1,694 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,352 developers. It's quick & easy.

a document I would like to see...

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

--
Mark Harrison
Pixar Animation Studios
Jul 18 '05 #1
10 1997

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

Jul 18 '05 #2
Well, pydoc.org had a search feature, but it's been "temporarily
disabled" for a long time now.

On Thu, Jul 29, 2004 at 06:02:00PM +0000, Mark Harrison wrote:
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

--
Mark Harrison
Pixar Animation Studios

Jul 18 '05 #3

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
Jul 18 '05 #4
Mark Harrison wrote:
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 ?
Jul 18 '05 #5
On Thu, 29 Jul 2004 18:02:00 +0000, Mark Harrison wrote:
grep dircmp # what module is dircmp in?


http://www.python.org/doc/2.3.4/lib/....html#letter-d

could help, though it isn't 100% of what you ask for, it leads to it.
Jul 18 '05 #6
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

On Thu, 29 Jul 2004 18:02:00 +0000, Mark Harrison wrote:
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


Jul 18 '05 #7
Skip Montanaro <sk**@pobox.com> wrote:

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

--
Mark Harrison
Pixar Animation Studios
Jul 18 '05 #8
Simon Dahlbacka <sd***************@abo.fi> wrote:
are you aware of http://rgruet.free.fr/PQR2.3.html ?


I wasn't... thanks for the pointer!
Jul 18 '05 #9
On Thu, Jul 29, 2004 at 01:47:19PM -0500, Skip Montanaro wrote:

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)
ds*****@dstanek.com
http://roninds.homelinux.net

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

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

Jul 18 '05 #10

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>


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
Jul 18 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Aaron | last post: by
12 posts views Thread by Kepler | last post: by
13 posts views Thread by Stumped and Confused | last post: by
4 posts views Thread by jiing.deng | last post: by
136 posts views Thread by Matt Kruse | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.