import select import sys import trigger import logger log = logger.logger(__name__).get() class stdin_trigger(trigger.trigger): def get_triggered_page_list(self): count = 0 while True: r, w, x = select.select([sys.stdin], [], [], 0) if len(r) == 0: break count += 1 if count > 10: break for fh in r: if fh == sys.stdin: message = sys.stdin.readline().rstrip() if message == "": break log.info("***** stdin trigger saw: \"%s\" *****" % message) return None