Hi I have a bit of a vague question...
I wanted to construct a tool to search through log files and i wanted the following functionality:
1) Search through the log files until a given log line is found. 2) After finding 1) jump forward an unknown number of lines until a condition is met. At this point the data is used to do some computation. 3) After completing 2) I want to return to line found in 1) and proceed through the file.
Now I'm able to perform the 1) and 2) fairly easily just looping over each line:
for line in file
for 3) I was going to use something like file.seek(linenum) and continue to iterate over the lines. But is there a more efficient way for any of the above steps?
thanks