[Tutor] Re: Introduction and ? re: searching the list's archives

Abel Daniel abli at freemail.hu
Sun Sep 28 13:15:27 EDT 2003


"Robert Lilly" <rclilly at cox.net> writes:

> I know that many of the questions I will want to ask have probably already
> been discussed. So I've downloaded the mbox archive so that I may search
> through it before asking a question. However, I'm not sure what an efficient
> means for searching it may be. Does anyone have any recommendations on how
> to go about searching an mbox archive? I am working primarily under Windows
> 2000, but I have Cygwin installed, so a *nix solution may be viable as well.

The mbox files are plain text. This means that a simple grep could work. Some
ideas:

$ grep string mbox.file
looks for string in the mbox.file
$ grep string *
looks for string in every file in the current directory
$ grep string -A 5 -B 5 mbox.file
looks for string and prints not only the line which contains it, but 5-5 lines
before and after that line

you can also use regexes ( and set the case-senseitiveness I guess),
but as I'm too lazy to read grep's manpage on those rare occasions I
would need it, I usually resort to a simple (and resource-wasting)
pipeing:

$ grep foo file.txt | grep bar | grep -v baz

looks for lines in file.txt which contain 'foo' and 'bar' but not
'baz'

As an alternative approach, you could try importing the mbox files
into your favourite mail program and use it's search
function. (Provided it has one.)

Or, instead of all this, you can use everyone's favourite search
engine: google!  Searching the whole web has the advantage that you
might find the answer you are looking for somewhere else. It also has
the drawback that the signal-to-noise ratio is worse, so you might
have to fine-tune your search-terms to get good results.

If, however, you want to restrict searching to the python-tutor
archives, you can try something like
'foo inurl:mail.python.org/pipermail/tutor/'
as a searchterm (without the quotes) when looking for 'foo'. In this
case you'll most likely have to click on the 'repeat the search with
the omitted results included' link at the bottom of the results
page. Looking for 'dict' with this method gives 488 hits, but only 2
are shown, google claiming that the rest is too similar to that 2. :)

-- 
Abel Daniel



More information about the Tutor mailing list