From 5b3c3e53754615c9b1c3483ede2185d2e714e20f Mon Sep 17 00:00:00 2001 From: PySimpleGUI Date: Tue, 1 Mar 2022 04:39:16 -0500 Subject: [PATCH] Updated User Settings INI Demo with more examples of class interface --- DemoPrograms/Demo_User_Settings_Config_INI_Format.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/DemoPrograms/Demo_User_Settings_Config_INI_Format.py b/DemoPrograms/Demo_User_Settings_Config_INI_Format.py index 5e093182..28f4a661 100644 --- a/DemoPrograms/Demo_User_Settings_Config_INI_Format.py +++ b/DemoPrograms/Demo_User_Settings_Config_INI_Format.py @@ -79,4 +79,13 @@ if __name__ == '__main__': SETTINGS_PATH = '.' # create the settings object and use ini format settings = sg.UserSettings(path=SETTINGS_PATH, use_config_file=True, convert_bools_and_none=True) + # sg.popup(settings) + # settings['My Section1'].delete_entry(key='test') + # settings.delete_entry(section='My Section1', key='test') + # settings['My Section1'].delete_section() + # del settings['My Section1'] + # settings.delete_section(section='My Section1') + settings['Section 2'].set('var1', 'Default') + settings['Section 2']['var'] = 'New Value' + settings['NEW SECTION']['a'] = 'brand new section' save_previous_filename_demo()