June 2018 Update

This commit is contained in:
Ingy döt Net 2018-06-22 20:57:24 +00:00
parent ba8067c3b7
commit 22f33d4004
5278 changed files with 84726 additions and 14379 deletions

View file

@ -0,0 +1,23 @@
import Tkinter as tki
def scroll_text(s, how_many):
return s[how_many:] + s[:how_many]
direction = 1
tk = tki.Tk()
var = tki.Variable(tk)
def mouse_handler(point):
global direction
direction *= -1
def timer_handler():
var.set(scroll_text(var.get(),direction))
tk.after(125, timer_handler)
var.set('Hello, World! ')
tki.Label(tk, textvariable=var).pack()
tk.bind("<Button-1>", mouse_handler)
tk.after(125, timer_handler)
tk.title('Python Animation')
tki.mainloop()