我正在 Linux Fedora 中使用 Python。
运行下面的短程序,有一小会儿,我在屏幕的左上角看到一个小窗口,但程序仍在运行。
我想我必须在程序中添加更多内容。
我最后用
mainloop()
或time.sleep(15)
进行了测试,但结果相同。
海龟形状.py
import turtle
turtle.shape('turtle')
n = 0
f = 0
while n < 200:
turtle.forward(f)
turtle.right(15)
f += .1
n += 1
尝试使用
dnf install python3-tkinter
或
dnf install python3-tkinter.x86_64