Advertisement
farry

minimal-tkinter-after-timer.py

Aug 7th, 2020
1,063
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.23 KB | None | 0 0
  1. #!/usr/bin/env python3
  2.  
  3. import tkinter, time
  4. root = tkinter.Tk()
  5. clock = tkinter.Label(root, width=24)
  6. clock.pack()
  7. def tick():
  8.     clock.config(text=time.strftime('%H:%M:%S'))
  9.     root.after(200, tick)
  10. tick()
  11. root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement