[Tutor] time delay in graphics loop
Lloyd Kvam
lkvam@venix.com
Mon, 19 Nov 2001 14:54:28 -0500
When you put the sleep inside the y loop, you sleep for 5 seconds
everytime through the loop, = 60 seconds plus the other processing time.
Within x it is sleeping 12 * 16 * 5 which is a lot of seconds.
presumably, it is not hung, just much slower than your patience level.
Jane Handcock wrote:
> 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
>
>
> _______________________________________________
> Tutor maillist - Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>
>
--
Lloyd Kvam
Venix Corp.
1 Court Street, Suite 378
Lebanon, NH 03766-1358
voice:
603-443-6155
fax:
801-459-9582