<br>I'm not familiar with linecache.clearcache(), but did you flush the data to the filesystem with file_.flush() ?<br><br><div class="gmail_quote">On Wed, Mar 23, 2011 at 9:53 PM, jam1991 <span dir="ltr"><<a href="mailto:jordanmeyer1991@gmail.com">jordanmeyer1991@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">I'm trying to build a feature on to a text-based game that I've been<br>
working on that would allow users to view their stats. Information is<br>
stored in a flat text database file that is given the same name that<br>
they sign into the program with; however, this information doesn't<br>
appear in the file until after the program has closed. This poses a<br>
problem for retrieving the up-to-date statistics data during the same<br>
session. Is there anyway I can fix this? I'm using .write() to write<br>
text to the file and the linecache module to retrieve it. Running<br>
linecache.clearcache() at the beginning of the stat function doesn't<br>
seem to do the trick. Any help would be greatly appreciated!<br>
<font color="#888888">--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</font></blockquote></div><br>