This is a python class to manage a configuration file, regardless of the operating system. Configuration is a set of (key, value) that can be set and retrieved by using SimpleConfig as a dictionary. Keys and values must all be strings. Example usage:

conf = SimpleConfig('myapp')# Load configuration file if it exists
conf['foo'] = '3'# Set a value
conf.save()# Save the configuration file on disk
conf.delete()# Delete file, it was just an example

SimpleConfig builds the configuration file path using the operating system name and the application name: