Closed bgoli closed 7 months ago
I don't think this is necessary though. Currently the parser reads the environment variables "TMP" and "TEMP" in that sequence, and only if neither has been defined, uses the output dir of Pysces. I have coded and tested a prototype, it works fine to leave the pysces.model_dir
and pysces.output_dir
defined as the default yet doesn't change the CWD upon startup or when instantiating a model. I only need to add the option to configure this behaviour in the INI file. I will push to nocwd.
Just to follow up, I tested this (refer to #42) and it is not necessary to modify the parser. Currently we cd to a temporary directory for the parser to do its thing, and that has not changed. So in terms of #39 and #42, this is not needed.
You may of course want to change the parser to use TemporaryFile
in any case (to get rid of the reliance on environment variables being set), but that is a separate issue.
Fixed in 1.x releases
Currently PLY uses the current directory for it's temporary files. To make #39 portable this should be changed to use a safe temporary file.