Guest User

Untitled

a guest
Jan 22nd, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. import tkinter as tk
  2.  
  3.  
  4. def step(event):
  5. label['text'] += 1
  6.  
  7. if __name__ == '__main__':
  8. root = tk.Tk()
  9. label = tk.Label(root, text=0)
  10.  
  11. root.bind('<KeyPress-s>', step)
  12.  
  13. label.pack()
  14. root.mainloop()
Add Comment
Please, Sign In to add comment