fileinput
Dave Angel
davea at ieee.org
Wed Aug 12 13:35:45 EDT 2009
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
More information about the Python-list
mailing list