I'm using 2 separate scripts, Scale1.py
and Scale2.py
. To run them I enter sudo python Scale1.py
or sudo python Scale2.py
from the terminal command line. I would like to have a line in the Scale2.py
script in which if I press a button, the program breaks and runs Scale1.py
. Something like this, which doesn't work.
if GPIO.input(23) == False:
break(sudo python Scale1.py)