What I am trying to do is make my text change after one second of staying as the first text.
import time
from tkinter import *
text = StringVar()
text.set("1")
time.sleep(1)
text.set("2")
time.sleep(1)
text.set("3")
textlabel = Label(master, textvariable = btn_text)
textlabel.pack()
I found that time.sleep does not work in tkinter, so I searched it up and found I should use after(). This is what I changed it to:
import time
from tkinter import *
text = StringVar()
text.set("1")
text.set.after(2000,"2")
text.set.after(2000,"3")
Yet when I tried that, I got an error message,AttributeError: 'function' object has no attribute 'after'
and I cant seem to figure out what went wrong, so I would appreciate it if I could get some help.
Thanks :) -Jake