Advertisement
plarmi

clock tkinter

Dec 23rd, 2023
508
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | None | 0 0
  1. import sys
  2. from tkinter import *
  3. import time
  4. def timing():
  5.     c = time.strftime("%H : %M : %S")
  6.     clock.config(text=c)
  7.     clock.after(200,timing)
  8.  
  9. root=Tk()
  10. root.geometry("600x300")
  11. clock=Label(root,font=("times",60,"bold"),bg="red")
  12. clock.grid(row=2,column=2,pady=25,padx=100)
  13. timing()
  14. digital=Label(root,text="Clock",font="times 24 bold")
  15. digital.grid(row=0,column=2)
  16. nota=Label(root,text="hours          minutes          seconds",font="times 15 bold")
  17. nota.grid(row=3,column=2)
  18. root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement