Possible Duplicate:
How do I modify a text file in Python?
It's easy to write a new file, append to it, etc. But how can I write to the middle of a file?
I have an html report that is generated off of an automated process, and rather than rewrite the whole report, I want to just insert new data where it's new. Perhaps I want to look for a comment and append there. So, add new data after the line <!-- append here -->