fileinput

naaman arphaksad at gmail.com
Wed Aug 12 06:27:47 CEST 2009


I'm writing my first Python script and
I want to use fileinput to open a file in r+ mode.
Tried fileinput.input(sys.argv[1:],"r+") but that didn't work.
ANy ideas?

Need to find and overwrite a line in a file several times.
I can do it using open and seek() etc. but was wondering if I can use
fileinput.

thanks;




More information about the Python-list mailing list