-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathclock.py
More file actions
37 lines (27 loc) · 816 Bytes
/
clock.py
File metadata and controls
37 lines (27 loc) · 816 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
from tkinter import *
from time import *
# Functions
def update():
tim = strftime("%I : %M : %S %p")
date = strftime("%A, %d %B")
year = strftime("%Y")
timelabel.config(text=tim)
daylabel.config(text=date)
yearlabel.config(text=year)
window.after(1000, update)
# Creating Window
window = Tk()
# Styling Window
window.title("Clock Program Tkinter")
window.geometry("600x300")
window.config(bg="black")
# Time Label
timelabel = Label(window, font=("Audiowide", 50), fg="#00ff00", bg="black")
timelabel.pack()
daylabel = Label(window, font=("Audiowide", 35), fg="#00ff00", bg="black")
daylabel.pack()
yearlabel = Label(window, font=("Audiowide", 75), fg="#00ff00", bg="black")
yearlabel.pack()
update()
# Displaying Window
window.mainloop()