runner.py 436 B

12345678910111213141516171819
  1. '''
  2. Created on 27-jul.-2014
  3. @author: Simon
  4. '''
  5. import target_py.target as target
  6. from sccd.runtime.statecharts_core import Event
  7. import threading
  8. if __name__ == '__main__':
  9. controller = target.Controller()
  10. def raw_inputter():
  11. while 1:
  12. controller.addInput(Event(raw_input(), "input", []))
  13. thread = threading.Thread(target=raw_inputter)
  14. thread.daemon = True
  15. thread.start()
  16. controller.start()