Instant File I/O

Charles C.Sanders at DeleteThis.Bom.GOV.AU
Thu Mar 24 03:25:23 EDT 2011


"jam1991" <jordanmeyer1991 at gmail.com> wrote in message 
news:c0c76bc4-8923-4a46-9c36-6e1a0375f8a6 at l11g2000yqb.googlegroups.com...
[snip]
> they sign into the program with; however, this information doesn't
> appear in the file until after the program has closed. This poses a
> problem for retrieving the up-to-date statistics data during the same
> session. Is there anyway I can fix this? I'm using .write() to write
[snip]

    .flush() ?
>From http://www.tutorialspoint.com/python/file_methods.htm
file.flush()
Flush the internal buffer, like stdio's fflush. This may be a no-op on some 
file-like objects.
Charles





More information about the Python-list mailing list