Python GUI app for Clock

Creating a GUI application for clock in Python

Python provides Tkinter to develop GUI applications. Now, it’s upto the skills and imagination of the developer, what he want to develop using tkinter.In this tutorial I will make a simple digital clock GUI application using Tkinter.

#Importing modules
from tkinter import *
from tkinter.ttk import *
from time import strftime
#creating tkinter window
root = Tk()
root.title = ("Time")
# creating function to get time
def time():
    timeformat = strftime(("%H:%M:%S %p"))
    label.after(1000, time)
# Setting labels to window
label = Label(root, font=("calibri", 35, 'bold'), background='blue',foreground='white')
# to run

Aman Kharwal
Aman Kharwal

Coder with the ♥️ of a Writer || Data Scientist | Solopreneur | Founder

Articles: 1336

Leave a Reply