I am trying to use pelican (python) on Android (in termux). It fails when pelican tries to write to /tmp which near as I can tell, does not exist, and/or is a read-only file system.
The error is from os.py, in makedirs(name, mode)
OSError: [Errno 30] Read-only file system: '/tmp'
- How do I tell any sort of script on Android to use a different location for /tmp?
- How do I tell python on Android (in Termux) to use a different location for /tmp?
- What is the Android equivalent of /tmp?
Editing to respond to suggestion this is a duplicate:
I found that answer helpful, but it doesn't pertain to this question.
I tried the instructions suggested here: https://stackoverflow.com/a/18280309/608970 and found that by setting TMP, TMPDIR and TEMP that I can indeed change /tmp for python and create tmp files, IF the script uses the tempfile module.
Apparently, pelican does not. Which leaves my original question, in Android what is the model for /tmp, how do we port arbitrary scripts, and does it require a change to the code, or can it be otherwise fixed by changing the Android environment the code works within?