/
rnekrasov
/
Python
Обзор
Документация
Войти
/
rnekrasov
/
Python
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
UI-Apps/clock.py
29 строк
560 B
slowy07
refactor: clean code
30 янв 2022, 04:33
30 янв 2022, 04:33
f0af0c4
Код
Авторство
О чём код?
import tkinter # retrieve system's time from time import strftime # ------------------main code----------------------- # initializing the main UI object top = tkinter.Tk() # setting title of the App top.title("Clock") # restricting the resizable property top.resizable(0, 0) def time(): string = strftime("%H:%M:%S %p") clockTime.config(text=string) clockTime.after(1000, time) clockTime = tkinter.Label( top, font=("calibri", 40, "bold"), background="black", foreground="white" ) clockTime.pack(anchor="center") time() top.mainloop()