configuration.py 658 B

12345678910111213141516171819202122232425262728293031
  1. import json
  2. import os
  3. import sys
  4. class Configuration:
  5. def __init__(self):
  6. # self.system_config = self.get_system_config()
  7. pass
  8. def get_system_config(self):
  9. """"读取配置"""
  10. if sys.platform == 'win32':
  11. config_file_path = r'./config.json'
  12. elif sys.platform == 'linux':
  13. config_file_path = 'config.json'
  14. with open(config_file_path) as json_file:
  15. config = json.load(json_file)
  16. return config
  17. def set_config(self):
  18. pass
  19. def add_device(self):
  20. pass
  21. def delete_device(self):
  22. pass
  23. def updata_device(self):
  24. pass