[Tutor] time delay in graphics loop

Jane Handcock jane@jhandcock.freeserve.co.uk
Mon, 19 Nov 2001 19:49:51 -0000


Hi

I have just started to use Python and am working through the LiveWires
Python Course.
Can anyone explain why the time delay in the code below works fine (before
the graphics window is filled with blue circles), but the program hangs if I
put the line time.sleep(1) inside the y or x loops?


from livewires import *
import time
begin_graphics()
set_colour(Colour.blue)
time.sleep(5)
for y in range(12):
    for x in range(16):
        circle(x*40+20,y*40+20,20)
end_graphics