-
-
Save amankharwal/5eca55fd5518055021e2ab9fa509cb89 to your computer and use it in GitHub Desktop.
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
from tkinter import Label, Tk | |
import time | |
app_window = Tk() | |
app_window.title("Digital Clock") | |
app_window.geometry("420x150") | |
app_window.resizable(1,1) | |
text_font= ("Boulder", 68, 'bold') | |
background = "#f2e750" | |
foreground= "#363529" | |
border_width = 25 | |
label = Label(app_window, font=text_font, bg=background, fg=foreground, bd=border_width) | |
label.grid(row=0, column=1) | |
def digital_clock(): | |
time_live = time.strftime("%H:%M:%S") | |
label.config(text=time_live) | |
label.after(200, digital_clock) | |
digital_clock() | |
app_window.mainloop() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment