[Python] How to draw the whole picture at once in Python using turtle? [duplicate]

Discussão em 'Python' iniciado por Stack, Agosto 23, 2025.

  1. Stack

    Stack Membro Participativo

    I am making an analogue clock in Python using turtle. It has to be renewed every t seconds. For that, I am redrawing it every t seconds. I need it to be redrawn immediately (now it places all the elements one by one taking more than my t seconds). How can I do that? Actually, it does not have to be redrawn every t seconds, it's just the hands that have to move. Is there any other, easier way?

    I have tried making speed 0 but that does not help. Maybe, there are some other ways to make the hands move?

    turtle.reset()
    turtle.speed(0)
    while True:
    turtle.reset()
    clock_face.draw()
    hour_hand.showCurrentTime()
    minute_hand.showCurrentTime()
    second_hand.showCurrentTime()
    turtle.up()
    time.sleep(t)

    Continue reading...

Compartilhe esta Página