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

Method load

PySimpleGUI/PySimpleGUI.py:22663–22679  ·  view source on GitHub ↗

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

(self, filename=None, path=None)

Source from the content-addressed store, hash-verified

22661 return self.full_filename
22662
22663 def load(self, filename=None, path=None):
22664 """
22665 Specifies the path and filename to use for the settings and reads the contents of the file.
22666 The filename can be a full filename including a path, or the path can be specified separately.
22667 If no filename is specified, then the caller's filename will be used with the extension ".json"
22668
22669 :param filename: Filename to load settings from (and save to in the future)
22670 :type filename: (str or None)
22671 :param path: Path to the file. Defaults to a specific folder depending on the operating system
22672 :type path: (str or None)
22673 :return: The settings dictionary (i.e. all settings)
22674 :rtype: (dict)
22675 """
22676 if filename is not None or path is not None or self.full_filename is None:
22677 self.set_location(filename, path)
22678 self.read()
22679 return self.dict
22680
22681 def delete_file(self, filename=None, path=None, report_error=False):
22682 """

Callers 12

__init__Method · 0.95
Demo_Google_TTS.pyFile · 0.80
speakFunction · 0.80
load_from_diskMethod · 0.80
readMethod · 0.80
user_settings_loadFunction · 0.80
execute_py_fileFunction · 0.80
execute_editorFunction · 0.80
execute_file_explorerFunction · 0.80

Calls 2

set_locationMethod · 0.95
readMethod · 0.95

Tested by

no test coverage detected