didn't seem to work with time.sleep() - at least on Spyder. Related discussion here: https://groups.google.com/forum/?fromgroups#!topic/spyderlib/SkfKYOvwrOI