inserting into a file

Sai Krishna M saikrishbe at gmail.com
Mon Sep 11 08:40:21 EDT 2006


I want to insert a string in a file after a particular line.

I thought of using seek() function but on opening the file in append
mode the seek value is undone.
One crude idea i had was to read the file in a list and insert the
string correspondingly.

Is there any other way to do this?
Please help...

Sai krishna M
-- 
I love Freedom



More information about the Python-list mailing list