Open the file inside your script in append mode.

open('filename', 'wa')


On May 16, 11:41 pm, globalrev <[EMAIL PROTECTED]> wrote:
> i ahve a program that takes certain textsnippets out of one file and
> inserts them into another.
>
> problem is it jsut overwrites the first riow every time.
>
> i want to insert every new piece of text into the next row.
> so:
> 1. how do i write to a new line every time i write to the file?
>
> 2. if i dont want to write to a new line but just want to insert it
> after the last token in the file, how do i do then?

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to