I have to stop a loop and resume after many seconds. I tried to use after(), but the loop don't freeze. And when I use time.sleep() (works out tkinter), tkinter freeze. Have another way or a function equivalent time.sleep() without freeze.
code:
for message in listOfMessages:
time.sleep(message.time)
#manipulate message
#change text widget
This will freeze my tkinter app.
I tried to use after() but message.time is a float: 0.5054564 to 1.5234244. It's random. And after supports only int. I can't convert to int, because low numbers make differents. And if i convert 0.52342342 in int: 523... i lost the others 42342
and this dont work too:
def changes(#values):
#manipulate message
#change text widget
for message in listOfMessages:
app.after(message.time, lambda: changes(#values))
Have another function equivalent time.sleep thats not freeze tkinter and is different that after()? If not, have another way to do this? Thanks for attention.