Advertisement
fmasanori

Tkinter Clock

Aug 23rd, 2012
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.37 KB | None | 0 0
  1. #by Luciano Ramalho
  2. import tkinter
  3. from time import strftime
  4.  
  5. relógio = tkinter.Label()
  6.  
  7. relógio.pack()
  8. relógio['font'] = 'Helvetica 120 bold'
  9. relógio['text'] = strftime('%H:%M:%S')
  10.  
  11. def tictac():
  12.     agora = strftime('%H:%M:%S')
  13.     if agora != relógio['text']:
  14.         relógio['text'] = agora
  15.     relógio.after(100, tictac)
  16.  
  17. tictac()
  18. relógio.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement