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.

15 lines
370 B

import configparser
class Config:
def __init__(self):
# 初始化配置解析器
self.config = configparser.ConfigParser()
# 读取配置文件
self.config.read('Config/config.ini')
def get(self, section, option):
# 获取指定部分和选项的配置值
return self.config.get(section, option)