Specifies the path and filename to use for the settings and reads the contents of the file. The filename can be a full filename including a path, or the path can be specified separately. If no filename is specified, then the caller's filename will be used with the extension ".json"
(filename=None, path=None)
| 23043 | |
| 23044 | |
| 23045 | def user_settings_load(filename=None, path=None): |
| 23046 | """ |
| 23047 | Specifies the path and filename to use for the settings and reads the contents of the file. |
| 23048 | The filename can be a full filename including a path, or the path can be specified separately. |
| 23049 | If no filename is specified, then the caller's filename will be used with the extension ".json" |
| 23050 | |
| 23051 | :param filename: Filename to load settings from (and save to in the future) |
| 23052 | :type filename: (str) |
| 23053 | :param path: Path to the file. Defaults to a specific folder depending on the operating system |
| 23054 | :type path: (str) |
| 23055 | :return: The settings dictionary (i.e. all settings) |
| 23056 | :rtype: (dict) |
| 23057 | """ |
| 23058 | settings = UserSettings._default_for_function_interface |
| 23059 | return settings.load(filename, path) |
| 23060 | |
| 23061 | |
| 23062 | def user_settings_file_exists(filename=None, path=None): |