>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. There are more sophisticated methods but that should do...

How? Does your tutorial cover that (i don't remember it doing so)?

>You need to catch the error not state it.

OK

>try: f = file(....)
>except IOError: print 'file not....'

Did that, IO Error handling works great now. Thanks
         JQ 

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to