Difficult-Rocket/tests/test_config_file.py
2021-05-25 21:15:43 +08:00

15 lines
322 B
Python

import configparser
configs = configparser.ConfigParser()
configs.read('test_config.config')
print(configs.sections())
for c in configs.sections():
for con in configs[c]:
name = configs[c][con]
print(c, con, name)
conf = configparser.ConfigParser()
conf.read('test_config.config')
print(type(conf))