You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yy_rms_39zhiyao_duizhao/config/SystemConfig.py

19 lines
418 B

import os
import configparser
class SystemConfig:
config = configparser.ConfigParser()
configPath = os.getcwd() + '/config/system.conf'
config.read(configPath)
@classmethod
def getConfig(cls, key):
return cls.config.get('system', key)
@classmethod
def setConfig(cls, key, value):
cls.config.set('system', key, value)
cls.config.write(open(cls.configPath, 'w'))