"Antonio de la Fuente" <t...@muybien.org> wrote
> if not line.isspace() and not line == 'foo':
>     fileOut.write(line)

But then, the new log file will have all the blocks, even the ones that
had 'foo' on it, even if the foo lines weren't there anymore. No? or
is there anything that I don't get?

I think the test should be:

if not line.isspace and 'foo' not in line:
    fileOut.write(line)

HTH,


--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to