Skip to content

Instantly share code, notes, and snippets.

@fmasanori
Last active June 28, 2017 19:19
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save fmasanori/4961824 to your computer and use it in GitHub Desktop.
Save fmasanori/4961824 to your computer and use it in GitHub Desktop.
Clock GUI
import tkinter
from time import strftime
#by Luciano Ramalho
clock = tkinter.Label()
clock.pack()
clock['font'] = 'Helvetica 120 bold'
clock['text'] = strftime('%H:%M:%S')
def tictac():
agora = strftime('%H:%M:%S')
if agora != clock['text']:
clock['text'] = agora
clock.after(100, tictac)
tictac()
clock.mainloop()
@p5f8
Copy link

p5f8 commented Apr 26, 2014

Olá Masanori,
Testei no no ubuntu 12.04 e precisei alterar o import tkinter para Tkinter, também foi preciso alterar no momento da instanciação.
Obrigado por disponibilizar o código estou aprendendo muito.

@phlyper
Copy link

phlyper commented May 12, 2015

Amazing :)

Copy link

ghost commented Mar 29, 2017

AWESOME DUDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment