main.py 582 B

123456789101112131415161718192021222324252627
  1. from common.sql_lite import init_global_db_connection, close_global_db_connection
  2. from logic.logic_ui import Win
  3. from service.batch_task import stop_batch_task
  4. from config import load_config
  5. from service.robot import init_robot
  6. def main():
  7. load_config()
  8. # 初始化sql_lite
  9. init_global_db_connection()
  10. # 初始化 wcf
  11. init_robot()
  12. try:
  13. win = Win()
  14. win.mainloop()
  15. finally:
  16. stop_batch_task()
  17. close_global_db_connection()
  18. # Press the green button in the gutter to run the script.
  19. if __name__ == '__main__':
  20. main()