Answers for "raspberry pi python2 start script"

0

raspberry pi run python script on boot

Add it to the crontab
The crontab runs commands at defined times.

Edit the file:

sudo crontab -e
Add line to file (here a python script):

@reboot python3 /home/pi/Desktop/exemple.py &
Posted by: Guest on August-01-2021
0

run a python script from another python script on a raspberry pi

import subprocess
import sys

results = subprocess.run(["sys.executable", "MyPythonScriptName.py"])
Posted by: Guest on July-09-2021

Python Answers by Framework

Browse Popular Code Answers by Language