Preserve case in ConfigParser?

前端 未结 5 1842
闹比i
闹比i 2020-12-04 23:00

I have tried to use Python\'s ConfigParser module to save settings. For my app it\'s important that I preserve the case of each name in my sections. The docs mention that pa

5条回答
  •  离开以前
    2020-12-04 23:35

    For me worked to set optionxform immediately after creating the object

    config = ConfigParser.RawConfigParser()
    config.optionxform = str 
    

提交回复
热议问题