Module to run and control leyk lightning
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

leyk.py 590B

1234567891011121314151617181920212223
  1. import config
  2. import logging
  3. import report
  4. import socket
  5. import subprocess
  6. import time
  7. import piface_function
  8. try:
  9. from config import APP_NAME as ROOT_LOGGER_NAME
  10. except ImportError:
  11. ROOT_LOGGER_NAME = 'root'
  12. logger = logging.getLogger(ROOT_LOGGER_NAME).getChild('main')
  13. if __name__ == '__main__':
  14. report.appLoggingConfigure(config.__BASEPATH__, config.LOGTARGET, ((config.APP_NAME, config.LOGLVL), ), fmt=config.formatter, host=config.LOGHOST, port=config.LOGPORT)
  15. #
  16. l = piface_function.leyk()
  17. while True:
  18. time.sleep(30)
  19. l.publish_states()