runner.py 491 B

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