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 <jordanmeyer1...@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 >
-- http://mail.python.org/mailman/listinfo/python-list