Preference (sfi.Preference)¶
-
class
sfi.
Preference
¶ This class provides a set of utilities for loading and saving preferences.
Method Summary
deleteSavedPref
(section, key)Delete a saved preference. getSavedPref
(section, key, defaultValue)Get a saved preference. setSavedPref
(section, key, value)Write a saved preference. Method Detail
-
static
deleteSavedPref
(section, key)¶ Delete a saved preference.
Parameters: - section (str) – The preference section.
- key (str) – The preference key.
-
static
getSavedPref
(section, key, defaultValue)¶ Get a saved preference.
Parameters: - section (str) – The preference section.
- key (str) – The preference key.
- defaultValue (str) – The default value if the key is not found.
Returns: The saved preference.
Return type: str
-
static
setSavedPref
(section, key, value)¶ Write a saved preference.
Parameters: - section (str) – The preference section.
- key (str) – The preference key.
- value (str) – The value to save.
-
static