I'm having problems with starting a python script on Raspberry Pi boot. I have read many threads and tried some tricks, however, none of them worked for me.
The file I am trying to execute is named test.py, it just logs a time to another file, when was Pi's startup:
f.write('Startup on: %s\n'%(tim))
python /home/pi/test.py &
If you don't specify absolute path,
open assume relative path to current working directory.
You'd better to try use absolute path first, before you know where the working directory is.
f = open('/home/pi/logger.txt', 'w')