这是我的方法:
def readConfigProperties(sectionName):
    # Using Confir Parser : Import the package First : add interpreter too
    config = configparser.RawConfigParser()
    config.read('Path To Properties ')
    details_dict = dict(config.items(sectionName))
    print(details_dict)
    return details_dict目前,我正在传递节名称,这工作得很好,但我想要加载之前场景的所有完整的属性文件一次。
发布于 2020-07-21 04:45:49
这样做如何:
all = {} 
for section_name in config.sections():
    for name, value in config.items(section_name):
        all[name] =valuehttps://stackoverflow.com/questions/63003462
复制相似问题