a quick gui clock
to speak easy, we are using a linux distro
# install tkinter using terminal
sudo apt install python-tk
# make a text file and copy the text below, title file clock.py
# run file in terminal using: python clock.py
# import library
import time
import datetime
# sudo apt install python-tk
try:
from tkinter import *
except ImportError:
from Tkinter import *
# GUI root screen
root = Tk()
root.title('a clock')
root.geometry('250x25+0+0')
# get the clock time
def getClock():
start = time.time()
clock = datetime.datetime.fromtimestamp(start).strftime('% H:%M:%S')
label1 = Label(root, text=clock, font=("arial", 10,"bold"), fg="black").place(x=90,y=6)
root.after(1000, getClock)
root.after(1000, getClock)
root.mainloop()