这是我的方法:
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
目前,我正在传递节名,这可以正常工作,但我想在场景之前一次加载完整的属性文件
config.sections()
将返回一个节列表,因此,例如,如果要将整个配置文件读入嵌套字典,可以使用:输入文件中的示例:
这将给你:
做什么呢
相关问题 更多 >
编程相关推荐