Controller.py 716 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # @author: nandHyf
  2. import Stateful, View
  3. class Command():
  4. pass
  5. class Client():
  6. def get_config():
  7. # T-B-C...
  8. configs = ['lang', 'listStyle']
  9. # rl == 'r'eturn 'l'ist
  10. rl = Stateful.matchTomlKeys("config.toml", configs)
  11. global lang, listStyle
  12. lang = rl[0]
  13. listStyle = rl[1]
  14. def get_help():
  15. print(Stateful.matchTomlKey("config.toml", lang, "command-help"))
  16. def start():
  17. # 1. get config
  18. Client.get_config()
  19. # test code
  20. Client.get_help()
  21. # 2. list board
  22. # Command.list
  23. # 3. wait command input
  24. command = input()
  25. if __name__ == "__main__":
  26. Client.start()