parsing a long text file for specific text

Jim Ragsdale overlord at
Tue Jan 29 12:31:58 EST 2002

Im a programming newbie, but I would like to write a python script to parse
a possibly long log file for specific text and then dump some of the text to
another file. The script would run every 30 minutes or so and i think it
would be nice if it saved the last possition to keep from redoing
everything. The only problem i see with saving the position is if the server
crashes or gets restarted, the log file starts over, but I dont want to keep
adding the same lines to the new file everytime.

Before if I have done anything like this, I used a loop to check to see if
it matched a piece of text, but this takes a while. Is there a better way?
Any thoughts? Any comments would be appreciated, thanks!

Jim Ragsdale

overlord at

More information about the Python-list mailing list