File modes

HMS Surprise john at datavoiceint.com
Fri May 11 14:01:08 EDT 2007


On May 10, 7:11 pm, Jon Pentland <J2Th... at gmail.com> wrote:
> I don't really see the use for being able to do that. Have you tried
>

Well, I think I found a reason and it probably happens quite a bit.

I open the file and read it into a list. I pop some elements from the
list for processing and then write the shortened list back to disk to
be available for other functions to access later, where later varies
from seconds to days. There is no need to keep the file open till
after the processing so I wish to write/flush/close right away.

jvh




More information about the Python-list mailing list