Instant File I/O

Dan Stromberg drsalists at gmail.com
Thu Mar 24 01:09:28 EDT 2011


I'm not familiar with linecache.clearcache(), but did you flush the data to
the filesystem with file_.flush() ?

On Wed, Mar 23, 2011 at 9:53 PM, jam1991 <jordanmeyer1991 at gmail.com> wrote:

> I'm trying to build a feature on to a text-based game that I've been
> working on that would allow users to view their stats. Information is
> stored in a flat text database file that is given the same name that
> 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
> text to the file and the linecache module to retrieve it. Running
> linecache.clearcache() at the beginning of the stat function doesn't
> seem to do the trick. Any help would be greatly appreciated!
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110323/3adcabd2/attachment.html>


More information about the Python-list mailing list