Difficult-Rocket/tests/test_config_file.py
2021-05-24 05:58:16 +08:00

16 lines
337 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))
print(conf[:])