Deletes a section with the name provided in the section parameter. Your INI file will be saved afterwards if auto-save enabled (default is ON) :param section: Name of the section to delete :type section: str
(self, section)
| 22798 | # del section_dict[key] |
| 22799 | |
| 22800 | def delete_section(self, section): |
| 22801 | """ |
| 22802 | Deletes a section with the name provided in the section parameter. Your INI file will be saved afterwards if auto-save enabled (default is ON) |
| 22803 | :param section: Name of the section to delete |
| 22804 | :type section: str |
| 22805 | """ |
| 22806 | if not self.use_config_file: |
| 22807 | return |
| 22808 | |
| 22809 | section_dict = self.section_class_dict.get(section, None) |
| 22810 | section_dict.delete_section() |
| 22811 | del self.section_class_dict[section] |
| 22812 | if self.autosave: |
| 22813 | self.save() |
| 22814 | |
| 22815 | def set(self, key, value): |
| 22816 | """ |