[Tutor] File IO flush

Sander Sweers sander.sweers at gmail.com
Mon Dec 8 18:15:36 CET 2008


Hello All, I was playing around with the zipfile module and wrote a
simple script to unzip a zip file. I then looked around on the
internet and found the recipe 252508 [1] on the active state cookbook
website.

In this recipe the author calls flush() and then close() on a file
object being written to disk. Now I understand what flush does but
would close() also flush the buffers to disk?

Thanks
Sander

[1] http://code.activestate.com/recipes/252508/


More information about the Tutor mailing list