You really should be using something like the Tkinter after method rather than time. sleep(...). There's ...
stackoverflow.com