Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import commands
- import time
- lichtan = False
- getnotes = "python inotes.py -c inotes.cfg -l"
- while True:
- notes = str(commands.getstatusoutput(getnotes))
- print notes
- if notes.endswith("an')") and lichtan is False:
- print 'LICHT AN'
- lichtan = True
- elif notes.endswith("aus')") and lichtan:
- print 'LICHT AUS'
- lichtan = False
- else:
- print 'No Action'
- time.sleep(10)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement