Thanks to y'all. I should have be more careful reading the documentation.

Cheers

On Fri, May 14, 2010 at 10:07 PM, Martin v. Loewis <mar...@v.loewis.de> wrote:
>> The code works fine. I just don't know how f.write works. It says that
>> file.write won't write the file until file.close or file.flush.
>
> You are misinterpreting the documentation. It certainly won't keep the
> entire file in memory. Instead, it has a fixed-size buffer (something
> like 8kiB or 32kiB) in which it writes and which it flushes when that
> buffer is full.
>
> The comment about flush and close merely refers to the problem that some
> data may still be in the buffer at any point in time, unless you just
> called close or flush.
>
> HTH,
> Martin
>



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

Reply via email to