[Tutor] graphics

philip gilchrist philip at pacer.co.za
Tue Jan 13 03:38:32 EST 2004


Hi 

 

I am trying to use the graphics module from livewires, and can't get any
timing working. It seems to me that the timing from the main program and
the graphics are separate.

 

 

from livewires import *

print 'opening the graphics window'

begin_graphics()

move(100,200)

box(50,200,100,350)

circle( 75,275,20,filled=1)

circle(75,230,20,filled=0)

circle(75,310,20,filled=0)

time.sleep(3)

circle( 75,275,20,filled=0)

circle(75,230,20,filled=1)

circle(75,310,20,filled=0)

   

circle( 75,275,20,filled=0)

circle(75,230,20,filled=0)

circle(75,310,20,filled=1)

 

end_graphics()

 

I was hoping to simulate a traffic light (obviously I will include
colors later) but this times the three seconds and then draws the
graphic.

 

Any pointers??

 

Regards,

 

Philip

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20040113/16acaebc/attachment.html


More information about the Tutor mailing list