Python Digital clock | Python clock | Python amazing clock | Python simple clock project

 

 

Python Clock 


from tkinter import *
from tkinter.ttk import *

from time import strftime
root = Tk()
root.title("clock")

def time():
    string = strftime('%H:%M:%S %p')
    label.config(text=string)
    label.after(1000, time)

label= Label(root,font=("ds-digital",80),background="black",foreground="red")
label.pack(anchor="center")
time()
mainloop()


Download font : https://www.dafont.com/ds-digital.font

 

 



No comments

Powered by Blogger.