Skip to content

Commit 8c64e3c

Browse files
Merge pull request #18 from dashing-dev/main
Clock.py
2 parents a501bf5 + e30be65 commit 8c64e3c

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

clock.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
from tkinter import *
2+
from tkinter.ttk import *
3+
4+
from time import strftime
5+
6+
root = Tk()
7+
root.title("Clock")
8+
9+
def time():
10+
string = strftime('%I:%M:%S %p')
11+
label.config(text=string)
12+
label.after(1000, time)
13+
14+
label = Label(root, font=("ds-digital",80), background = "black", foreground = "cyan")
15+
label.pack(anchor = 'center')
16+
time()
17+
18+
mainloop()

0 commit comments

Comments
 (0)