PythonScript on RC.Local

Hi, im just learning python, and have a bit dumb question. I want to run a script on start-up from rc.local then calling a python script which may contains my series of commands like udp telemetry broadcast and some others later.

Im having this error :frowning:


I’m afraid you are actually mixing up python and bash scripts.

  1. You should not set a python script extension to .sh
  2. You can’t just run bash commands in a python script. If you are really determined to use python, you should use the subprocess module.

It’s probably a good idea to go through some bash and linux tutorials, just so you know the environment better.