Semantics of file.close()

Hrvoje Niksic hniksic at xemacs.org
Wed Jul 18 06:55:01 EDT 2007


"Evan Klitzke" <evan at yelp.com> writes:

>> But the writes are buffered, and close causes the buffer to be
>> flushed.  file.close can throw an exception just like fclose, but
>> it will still ensure that the file is closed.
>
> Is this buffering being done by Python or the kernel?

It is done in the user space, by the C stdio library which Python
currently uses for IO.



More information about the Python-list mailing list