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

Function update_metrics

DemoPrograms/Demo_Desktop_Widget_Weather.py:247–255  ·  view source on GitHub ↗

Adjust the GUI to reflect the current weather metrics

(window)

Source from the content-addressed store, hash-verified

245
246
247def update_metrics(window):
248 """ Adjust the GUI to reflect the current weather metrics """
249 metrics = ['City', 'Temp', 'Feels Like', 'Wind', 'Humidity', 'Precip 1hr',
250 'Description', 'Icon', 'Pressure', 'Updated']
251 for metric in metrics:
252 if metric == 'Icon':
253 window[metric].update(data=APP_DATA[metric])
254 else:
255 window[metric].update(APP_DATA[metric])
256
257
258def main(refresh_rate, win_location):

Callers 1

mainFunction · 0.85

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected