fileinput

naaman arphaksad at gmail.com
Wed Aug 12 21:15:42 EDT 2009


On Aug 12, 1:35 pm, Dave Angel <da... at 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



More information about the Python-list mailing list