I'm trying to run this Python script:
import os
with open('check_door', 'r') as file:
text_1 = file.readline()
with open('alert_check', 'r') as file2:
text_2 = file2.readline()
if text_1 == 'locked' and text_2 == 'disabled':
os.system('python sensor.py')
using this command: watch -n 60 /home/pi/check_sensor.py
I'm getting these errors:
/home/pi/check_sensor.py: 1: /home/pi/check_sensor.py: import: not found
/home/pi/check_sensor.py: 2: /home/pi/check_sensor.py: Syntax error: "(" unexpected
What am I doing wrong ?