Subject: Re: updating a spectrum
From: Tom Goddard
Date: Nov 16 12:13 PM

Previous: 451

Hi John,

Ok, I see now that Sparky opens the spectrum file and does not close
the file until the spectrum is no longer being viewed in Sparky. On
unix systems if the file is removed and replaced the code will still
access the original file which is hidden but not actually deleted from
the disk until all programs have closed it. Im not sure if Windows
behaves that way -- probably. So setting the cache size to 0 wont work
unless your update of the file actually opened the old file and modified
it, rather than removing it and creating a new file of the same name.
If the original file is removed, there is no provision in Sparky to
replace it with the new file (even if it has the same file name and
path). You would have to Save your Sparky session and restart. Adding
that capability would require C++ code modifications, and is not
possible with a Python script.

Tom


John Gledhill wrote:
that doesnt seem to work for me, it never seems to clear it from
memory (im using vista). is there a way you could do it with a script?