Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
turtle window not showing
#2
First you need to import the module, then after defining your code you need to allow it to execute.
See the code example below:
import turtle

def main():
    wn = turtle.Screen()
    alex = turtle.Turtle()
    alex.forward(150)
    alex.left(90)
    alex.forward(75)
    wn.exitonclick()
if __name__=='__main__':
    main()
"Often stumped... But never defeated."
Reply


Messages In This Thread
turtle window not showing - by yokeloonlo01 - May-29-2020, 02:36 AM
RE: turtle window not showing - by DT2000 - May-29-2020, 02:45 AM
RE: turtle window not showing - by yokeloonlo01 - May-29-2020, 02:58 AM
RE: turtle window not showing - by pyzyx3qwerty - May-29-2020, 09:41 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Is there a way to call and focus any popup window outside of the main window app? Valjean 6 1,985 Oct-02-2023, 04:11 PM
Last Post: deanhystad
  Turtle Graphics - Screen & Window Sizing jerryf 1 925 Feb-09-2023, 08:02 PM
Last Post: jerryf
  Pyspark Window: perform sum over a window with specific conditions Shena76 0 1,219 Jun-13-2022, 08:59 AM
Last Post: Shena76
  wn = turtle.screen() AttributeError: module 'turtle' has no attribute 'screen' Shadower 1 6,232 Feb-06-2019, 01:25 AM
Last Post: woooee
  Help! Turtle not working, even when we click the turtle demo in IDLE nothing happens. BertyBee 3 5,706 Jan-04-2019, 02:44 AM
Last Post: SheeppOSU

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020