Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit bbf7925

Browse files
committed
refactoring the code
1 parent 9782a73 commit bbf7925

File tree

2 files changed

+20
-21
lines changed

2 files changed

+20
-21
lines changed

‎Digital clock.py‎

Lines changed: 0 additions & 21 deletions
This file was deleted.

‎app.py‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
from time import strftime
2+
from tkinter import Label, Tk
3+
4+
#======= Configuring window =========
5+
window = Tk()
6+
window.title("")
7+
window.geometry("200x80")
8+
window.configure(bg="green")
9+
window.resizable(False, False)
10+
11+
clock_label = Label(window, bg="green", fg="white", font = ("Times", 30, 'bold'), relief='flat')
12+
clock_label.place(x = 20, y = 20)
13+
14+
def update_label():
15+
current_time = strftime('%H: %M: %S')
16+
clock_label.configure(text = current_time)
17+
clock_label.after(80, update_label)
18+
19+
update_label()
20+
window.mainloop()

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /