a document I would like to see...

Mark Harrison mh at dreadnok.pixar.com
Thu Jul 29 20:09:10 EDT 2004


Skip Montanaro <skip at 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



More information about the Python-list mailing list