Autostart Python script on Raspberry Startup

Edit this file /etc/rc.local

sudo nano /etc/rc.local

Add line to this file, before "stop 0"

eg - sudo python  /user/pi/paulsript.py > file >> file &

The first > tells Linux to output the screen to the file.  The >> tells Linux to output all screen errors to the same file

The & tells Linux to run the task in the backround

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>