import configparser def conf(): '返回配置文件对象' conf = configparser.ConfigParser() conf.read('./conf/app.ini') return conf