海龟元素不会出现在开发中 Window

Turtle Elements Won't Show Up In Developed Window

所以我想借助一个乒乓程序来制作一个迷宫程序。一切都很好,直到乌龟破烂不堪。 python 版本是 3.9.7,这里是代码,以及由代码 运行.

生成的 window 的屏幕截图
import turtle


#Screen: Should be 800 X 600 box, with blue background, and a title of "Test"
wn = turtle.Screen()
wn.title("Test")
wn.bgcolor("blue")
wn.setup(width=800, height=600)
wn.tracer(0)

#Simple character/shape, square, red.
character = turtle.Turtle()
character.speed(0)
character.shape("square")
character.color("red")
character.penup()
character.goto(0, 0)

#main loop
turtle.mainloop()

下面是 window 的图片。如您所见,字符从 0, 0 中丢失。我该如何解决这个问题?代码有问题吗?我必须重新安装一些东西吗? [1]: https://i.stack.imgur.com/LMclH.png

你不得不说:

while True:
     wn.update()

不是:

turtle.mainloop()