I have a Python binary that uses SQLite as its base database. The SQLite documentation and code suggest that setting up any of the following three environment variables should work:
export TMP=/var/tmp/sqlite/ export TEMP=/var/tmp/sqlite/ export TEMPDIR=/var/tmp/sqlite/
If I export the above variables in my bash script just before I run my Python binary, this will not help.
Another option I tried calls putenv() by setting os.environ :
os.environ['TMP'] = /var/tmp/sqlite/ os.environ['TEMP'] = /var/tmp/sqlite/ os.environ['TEMPDIR'] = /var/tmp/sqlite/
None of the above options helped convince SQLite to use /var/tmp/sqlite as the temp repository directory. The only option that worked - in the SQLite documentation - deprecated - sets the temp_store_directory pragma temp_store_directory :
PRAGMA temp_store_directory = '/egnyte/.work/sqlite_temp'
Since using the pragma instruction is not the choice I would like to make, is there any other trick?
user866937
source share