When reading out a config file with python's configparser
package, all key names are lowercase strings. Does anybody know how to read the strings preserving capital and uppercase words?
For example:
$cat config.cfg
[DEFAULT]
Key_1 = SomeWord
KEY_2 = Another Word
$ python3
>>> from configparser import ConfigParser
>>> cf = ConfigParser()
>>> cf.read('./config.cfg')
['./config.cfg']
>>> print(cf.defaults())
OrderedDict([('key_1', 'SomeWord'), ('key_2', 'Another Word')])
Thanks for any help!