MCPcopy Index your code
hub / github.com/PySimpleGUI/PySimpleGUI / user_settings_get_entry

Function user_settings_get_entry

PySimpleGUI/PySimpleGUI.py:23010–23026  ·  view source on GitHub ↗

Returns the value of a specified setting. If the setting is not found in the settings dictionary, then the user specified default value will be returned. It no default is specified and nothing is found, then None is returned. If the key isn't in the dictionary, then it will be added

(key, default=None)

Source from the content-addressed store, hash-verified

23008
23009
23010def user_settings_get_entry(key, default=None):
23011 """
23012 Returns the value of a specified setting. If the setting is not found in the settings dictionary, then
23013 the user specified default value will be returned. It no default is specified and nothing is found, then
23014 None is returned. If the key isn't in the dictionary, then it will be added and the settings file saved.
23015 If no filename has been specified up to this point, then a default filename will be assigned and used.
23016 The settings are SAVED prior to returning.
23017
23018 :param key: Key used to lookup the setting in the settings dictionary
23019 :type key: (Any)
23020 :param default: Value to use should the key not be found in the dictionary
23021 :type default: (Any)
23022 :return: Value of specified settings
23023 :rtype: (Any)
23024 """
23025 settings = UserSettings._default_for_function_interface
23026 return settings.get(key, default)
23027
23028
23029def user_settings_save(filename=None, path=None):

Callers 11

__init__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85
settings_restoreMethod · 0.85
execute_get_editorFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected