Dana Booth dana at
Wed Mar 22 20:55:11 CET 2000

I have a small proggie that reads through the mailspool, looking for lines
containing keywords. If the mailbox contains mime encoded attachements, or
for some other reason is very large, it seems to take quite a long time. The
util uses readline() and the

Is readline() not very efficiant? I know that Perl is really the ticket for
most text processing utils that require anything more than Awk, and in
this case it's much faster, but the Python util goes on to do much more, and
I didn't want to call on Perl just for a textfile read.

Anyway, I'm pretty new to Python, is there a better way to analyze
textfiles? Or is the slowing it down?

Dana Booth <dana at>
Tacoma, Wa., USA

key at

More information about the Python-list mailing list