-
-
Save parzibyte/d3aca3aceba3b815db038d5de277eb3c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tkinter as tk | |
def obtener_hora_actual(): | |
return datetime.now().strftime("%H:%M:%S") | |
raiz = tk.Tk() | |
variable_hora_actual = tk.StringVar(raiz, value=obtener_hora_actual()) | |
raiz.etiqueta = tk.Label( | |
raiz, textvariable=variable_hora_actual, font=f"Consolas 60") | |
raiz.etiqueta.pack(side="top") | |
app = tk.Frame() | |
raiz.title("Reloj en Tkinter - By Parzibyte") | |
app.pack() | |
app.mainloop() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment