config.py 500 B

123456789101112131415161718192021222324252627
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. '''
  4. @Auther :liuyuqi.gov@msn.cn
  5. @Time :2018/7/7 3:04
  6. @File :config.py
  7. '''
  8. from configparser import ConfigParser
  9. cf = ConfigParser()
  10. config_path = "../conf/config.ini"
  11. section_name = "data_file_name"
  12. cf.read(config_path)
  13. class Config():
  14. def __init__(self):
  15. pass
  16. def getConfig(self):
  17. return self
  18. def setConfig(self, db_mysql, sysconfig, file):
  19. pass
  20. def setConfigByDB(self, db_mysql):
  21. self.db_mysql = ""