Feb-09-2021, 10:28 PM
Try it like this :
from subprocess import Popen p = Popen ('/home/pi/MagicMirror/restartMM.sh', shell = True) code = p.wait () print (p.returncode)