- ###### IMPORTATION DES MODULES REQUIS ######
- from Tkinter import *
- from time import gmtime, strftime, sleep
- #####################################
-
- #Creation de la fenetre principale
- root = Tk()
- root.resizable(width=False, height=False) # Fenetre non resizable
- root.geometry("130x40+0+0")
- root.overrideredirect(1) #Masquer la decoration de fenetre
- root.config(bg="red") # Couleur de fond : Rouge
- Label_Heure = Label(root, font=('', 20, 'bold'), bg='green') # Label qui contient l'heure
- Label_Heure.pack()
- ###### FONCTION D'AFFICHAGE DE L'HEURE ######
- def Heure():
- Label_Heure.config(text=strftime('%H:%M:%S'))
- Label_Heure.after(200, Heure) #Rafrichissement du Label qui contient l'heure
- ####################################
- Heure()
- root.mainloop()
###### IMPORTATION DES MODULES REQUIS ######
from Tkinter import *
from time import gmtime, strftime, sleep
#####################################
#Creation de la fenetre principale
root = Tk()
root.resizable(width=False, height=False) # Fenetre non resizable
root.geometry("130x40+0+0")
root.overrideredirect(1) #Masquer la decoration de fenetre
root.config(bg="red") # Couleur de fond : Rouge
Label_Heure = Label(root, font=('', 20, 'bold'), bg='green') # Label qui contient l'heure
Label_Heure.pack()
###### FONCTION D'AFFICHAGE DE L'HEURE ######
def Heure():
Label_Heure.config(text=strftime('%H:%M:%S'))
Label_Heure.after(200, Heure) #Rafrichissement du Label qui contient l'heure
####################################
Heure()
root.mainloop()