MCPcopy Index your code
hub / github.com/PySimpleGUI/PySimpleGUI / delete_section

Method delete_section

PySimpleGUI/PySimpleGUI.py:22800–22813  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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 """

Callers

nothing calls this directly

Calls 2

saveMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected