using python to append a file
Scherer, Bill
Bill.Scherer at VerizonWireless.com
Tue Jul 3 15:25:50 EDT 2001
open(fileName, 'a')
will do the trick.
On 3 Jul 2001, Thanh Le wrote:
> I am new to Python and was wondering if anyone could show me a way to
> append a file (similar to the way Unix does by using >> ). I've tried
> using open('file','r+') method and it overwrote whatever i had in that
> file. I am sure there is a way to append a file, but havent had much
> luck.
> Thanks in advance,
> Thanh
>
William K. Scherer
Sr. Member of Applications Staff - Verizon Wireless
Bill.Scherer_at_VerizonWireless.com
More information about the Python-list
mailing list