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

Function load_settings

DemoPrograms/Demo_Desktop_Widget_Weather.py:60–67  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

58
59
60def load_settings():
61 global API_KEY
62 settings = sg.UserSettings(path=SETTINGS_PATH)
63 API_KEY = settings['-api key-']
64 if not API_KEY:
65 sg.popup_quick_message('No valid API key found... opening setup window...', keep_on_top=True, background_color='red', text_color='white', auto_close_duration=3, non_blocking=False, location=win_location)
66 change_settings(settings)
67 return settings
68
69
70def change_settings(settings, window_location=(None, None)):

Callers 1

mainFunction · 0.70

Calls 1

change_settingsFunction · 0.85

Tested by

no test coverage detected