On Aug 12, 1:35 pm, Dave Angel <da...@ieee.org> wrote: > naaman wrote: > > 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; > > I haven't used it, but check out the 'inplace' keyword parameter. > > DaveA
I've only Python for a week so I'm not sure what inplace does -- http://mail.python.org/mailman/listinfo/python-list