[Tutor] Finding word in file

Alan G alan.gauld at freenet.co.uk
Thu May 19 19:27:29 CEST 2005


> >What are you trying?
> >You could simply read through the file line by line using the
string
> >search methods. Store the previous 2 lines then when found print
the
> >previous two lines, the current line and then read and print the
next
> >two lines.
>
> How? Does your tutorial cover that (i don't remember it doing so)?

Two topics -- one on handling files the other on handling text.

Alan G.



More information about the Tutor mailing list