Hello kah, > How do I change a line in a file?? > > For example I have the follwing text in my file: > > line1 > line2 > line3 > line4 > > How do I replace 'line2' with 'newline'. Since the write operation in > python will overwrite everything. See http://docs.python.org/lib/module-fileinput.html (inplace=1 is what you want).
Bye. -- ------------------------------------------------------------------------ Miki Tebeka <[EMAIL PROTECTED]> http://tebeka.bizhat.com The only difference between children and adults is the price of the toys
pgpWYGsd0cadw.pgp
Description: PGP signature
-- http://mail.python.org/mailman/listinfo/python-list