Controller.py 699 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 = Stateful.matchTomlKeys("config.toml", configs)
  10. global lang, listStyle
  11. lang = rl[0]
  12. listStyle = rl[1]
  13. def get_help():
  14. print(Stateful.matchTomlKey("config.toml", lang, "command-help"))
  15. def excute():
  16. pass
  17. def start():
  18. # get config
  19. Client.get_config()
  20. # test code
  21. Client.get_help()
  22. # list board
  23. # Command.list
  24. # wait command input
  25. command = input()
  26. if __name__ == "__main__":
  27. Client.start()