How can you rename a section in a ConfigParser object?
example helper function - silly really but it might save someone a few minutes work...
def rename_section(cp, section_from, section_to):
items = cp.items(section_from)
cp.add_section(section_to)
for item in items:
cp.set(section_to, item[0], item[1])
cp.remove_section(section_from)
As far as I can tell, you need to
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With