Web Analytics Made Easy - Statcounter
Skip to content

INI Files

In addition to the JSON file format, new in release 4.50.0 is the support of INI files.

This file format is a little different than JSON. INI Files have a concept of "Sections" where JSON does not. In PySimpleGUI the UserSettings API calls and use of the UserSettings object are very similar.

This demo shows how to use the UserSettings obiject to interface with these INI files. It's as easy as this to write a setting value:

settings = sg.UserSettings(use_config_file=True)
settings['Section']['setting'] = 'Some Value'

And reading is just as easy:

value = settings['Section']['setting']