main.py 767 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. '''
  4. @Auther :liuyuqi.gov@msn.cn
  5. @Time :2018/7/4 15:55
  6. @File :main.py
  7. '''
  8. # 数据预览
  9. from configparser import ConfigParser
  10. import libs.save_conf
  11. # step1: 数据参数初始化
  12. def getConfig():
  13. cf = ConfigParser()
  14. config_path = "../conf/config.ini"
  15. section_name = "data_file_name"
  16. cf.read(config_path)
  17. app_interference = cf.get(section_name, "app_interference")
  18. app_resources = cf.get(section_name, "app_resources")
  19. instance_deploy = cf.get(section_name, "instance_deploy")
  20. machine_resources = cf.get(section_name, "machine_resources")
  21. def init_conf():
  22. '''
  23. 初始化配置文件
  24. :return:
  25. '''
  26. libs.save_conf.write()
  27. if __name__ == '__main__':
  28. init_conf()