On Mon, Dec 8, 2008 at 12:15 PM, Sander Sweers <[EMAIL PROTECTED]> wrote: > 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?
Yes, close() will flush first; AFAIK there is no reason to call flush() immediately before close() on the same file object. Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor