On Sun, Oct 26, 2008 at 10:37 PM, Mike Meisner <[EMAIL PROTECTED]> wrote: > I'm running a number of test cases and saving their results in a shelve > file. > > A full run of the test cases takes about 36 hours. During that time, if > something interrupts the run (e.g., a power outage, which has happened), I > find that none of the completed test cases have been committed to the shelve > file even though, after each run, I make sure that the results are written > to the in-memory database (i.e., db = shelve.open(filename) at the beginning > of the test run; and db[key] = results after each test case). > > Is there a way to force the results for a single test case to be written > back to the shelve file? Other than opening/closing the shelve after each > test case run?
I think the sync() method might do this, depending on which implementation of dbm your shelf is using. Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor