John Purser wrote:
> Hello,
>
> I'm writing a system admin script in python that checks recently
> accessed files for keywords like "failed, denied, error,..." etc. I'm
> using popen to call grep -F <LIST> <LOG_FILE> but it's VERY slow. Can
> anyone suggest a faster method to do this?
>
I don't know whether it'd be faster, but you could read the file into a
Python string, then use re to find the keywords. What do you do after
finding them?
_______________________________________________
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor