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

Function user_settings_filename

PySimpleGUI/PySimpleGUI.py:22938–22960  ·  view source on GitHub ↗

Sets the filename and path for your settings file. Either paramter can be optional. If you don't choose a path, one is provided for you that is OS specific Windows path default = users/name/AppData/Local/PySimpleGUI/settings. If you don't choose a filename, your application's fil

(filename=None, path=None)

Source from the content-addressed store, hash-verified

22936
22937
22938def user_settings_filename(filename=None, path=None):
22939 """
22940 Sets the filename and path for your settings file. Either paramter can be optional.
22941
22942 If you don't choose a path, one is provided for you that is OS specific
22943 Windows path default = users/name/AppData/Local/PySimpleGUI/settings.
22944
22945 If you don't choose a filename, your application's filename + '.json' will be used.
22946
22947 Normally the filename and path are split in the user_settings calls. However for this call they
22948 can be combined so that the filename contains both the path and filename.
22949
22950 :param filename: The name of the file to use. Can be a full path and filename or just filename
22951 :type filename: (str)
22952 :param path: The folder that the settings file will be stored in. Do not include the filename.
22953 :type path: (str)
22954 :return: The full pathname of the settings file that has both the path and filename combined.
22955 :rtype: (str)
22956 """
22957 settings = UserSettings._default_for_function_interface
22958 if filename is not None or path is not None: # Any parameter set means we're changing the location
22959 settings.set_location(filename, path)
22960 return settings.get_filename(filename, path) # Return the full filename regardless of it being modified
22961
22962
22963def user_settings_delete_filename(filename=None, path=None, report_error=False):

Callers

nothing calls this directly

Calls 2

set_locationMethod · 0.80
get_filenameMethod · 0.80

Tested by

no test coverage detected