daily pastebin goal


a guest Jan 14th, 2015 19 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import commands
  2. import time
  3. lichtan = False
  4. getnotes = "python inotes.py -c inotes.cfg -l"
  5. while True:
  6.         notes = str(commands.getstatusoutput(getnotes))
  7.         print notes
  8.         if notes.endswith("an')") and lichtan is False:
  9.                 print 'LICHT AN'
  10.                 lichtan = True         
  11.         elif notes.endswith("aus')") and lichtan:
  12.                 print 'LICHT AUS'
  13.                 lichtan = False
  14.         else:
  15.                 print 'No Action'      
  16. time.sleep(10)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand