Created
July 31, 2020 18:01
-
-
Save israel-dryer/a85a9cfe76341c3b96ad9d1a6d5a9cf7 to your computer and use it in GitHub Desktop.
Simple clock update for PySimpleGUI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
A simple clock demonstration in PySimpleGUI | |
>> YouTube Comments Response << | |
""" | |
import PySimpleGUI as sg | |
from datetime import datetime | |
layout = [[sg.Text(text=datetime.now().strftime('%I:%M:%S'), key='-CLOCK-')]] | |
window = sg.Window('Clock', layout=layout) | |
while True: | |
event, values = window.read(1000) | |
current = datetime.now().strftime('%I:%M:%S') | |
window['-CLOCK-'].update(current) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment