Skip to main content
2 of 2
Added one resource to try, may update answer with translated steps for this question if they work out.
S0AndS0
  • 196
  • 1
  • 1
  • 7

The dirty trick I've used on RPi in the past was to put commands in my /etc/rc.local file just before the exit 0 line. In your case I'd try the following line and reboot.

python /full/path/to/file.py &

As you've stated that sudo level permissions are needed you may have to instead adjust the su command you've previously tried because right now it looks like you're trying to run under the pi user.

One warning about my suggestion of rc.local file usage, if your script exits with non zero status you'll not complete the boot so to be safer during tests you can try the following to ensue exit still equals 0

python /full/path/to/file.py & || exit 0

Edits and updates

Looking though some search data, found an instructable that demonstrates using a launcher script referenced in cron tab to facilitate loading python scripts. May seem round about to load cron to load a sh/bash script in order to load python but... it is convoluted enough to make some twisted sense.

S0AndS0
  • 196
  • 1
  • 1
  • 7