I am using the latest Anaconda
Python distribution and I wonder how can I tell Python to unzip/store all the temporary output to a specific folder (instead of the /tmp
directory).
Any ideas? Thanks!
I am using the latest Anaconda
Python distribution and I wonder how can I tell Python to unzip/store all the temporary output to a specific folder (instead of the /tmp
directory).
Any ideas? Thanks!
I found something interesting in the tempfile page. The function gettempdir
gets the temporary folder from the following environment variable:
- The directory named by the TMPDIR environment variable.
- The directory named by the TEMP environment variable.
- The directory named by the TMP environment variable.
- A platform-specific location:
- On Windows, the directories C:\TEMP, C:\TMP, \TEMP, and \TMP, in that order.
- On all other platforms, the directories /tmp, /var/tmp, and /usr/tmp, in that order.
- As a last resort, the current working directory.
Maybe you can overwrite one of this variable.