Difficult-Rocket/tests/test_config_file.py

15 lines
322 B
Python
Raw Normal View History

2021-05-24 05:58:16 +08:00
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')
2021-05-25 21:15:43 +08:00
print(type(conf))