On 15 Mar, 21:54, Unknown <[EMAIL PROTECTED]> wrote:

> I was expecting to replace the old value (serial) with the new one
> (todayVal). Instead, this code *adds* another line below the one found...
>
> How can I just replace it?

A file is a stream of bytes, not a list of lines. You can't just
replace a line with another, unless they have the exact same length.
You must rewrite the whole file to get it right.


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

Reply via email to