Yikes, this is code I wrote... the thorlabs mdt39xb driver saves the pyon file containing last used setpoints in the working directory. This is obviously not good, since this makes it highly sensitive to the way in which it was started -- in our setup they ended up in C:\WINDOWS\system32 (!)
I propose adding appdirs as in artiq to save the file in a predictable location. As (unfortunately) we are burdened with Windows, I'd prefer to use the user_data_dir function for this, unless there are objections. I'll prepare a PR to fix this.
appdirs looks good – I'm using the Qt standard directories functionality elsewhere, but most of these drivers don't depend on Qt, so a lightweight solution sounds good.
Yikes, this is code I wrote... the thorlabs mdt39xb driver saves the pyon file containing last used setpoints in the working directory. This is obviously not good, since this makes it highly sensitive to the way in which it was started -- in our setup they ended up in C:\WINDOWS\system32 (!)
I propose adding appdirs as in artiq to save the file in a predictable location. As (unfortunately) we are burdened with Windows, I'd prefer to use the
user_data_dir
function for this, unless there are objections. I'll prepare a PR to fix this.