Mailing List Archive

How to add data in a existant file ?
Hi,

I use python to developp a script and I want to know which is the fonction
that permit to add data in a existant file. I know already how to write data
in a new file -----> f=open('file.name','w') f.write('data') f.close()

But how to merge data in a existant file ?

Mail your response to fquiquet@lemel.fr
Thank's a lot for your help.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
How to add data in a existant file ? [ In reply to ]
Use the "a" mode for appending. The complete documentation
of the open() function can be found in the Library Reference:

http://www.python.org/doc/lib/built-in-funcs.html#l2h-213

Regards,
Stefan


On Mon, 19 Apr 1999 08:35:26 GMT, kiket@my-dejanews.com wrote:

>Hi,
>
>I use python to developp a script and I want to know which is the fonction
>that permit to add data in a existant file. I know already how to write data
>in a new file -----> f=open('file.name','w') f.write('data') f.close()
>
>But how to merge data in a existant file ?
>
>Mail your response to fquiquet@lemel.fr
>Thank's a lot for your help.
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own