Python 海龟窗口在 Linux Fedora 中不可见

问题描述 投票:0回答:1

我正在 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
python turtle-graphics python-turtle
1个回答
0
投票

尝试使用

dnf install python3-tkinter

dnf install python3-tkinter.x86_64
© www.soinside.com 2019 - 2024. All rights reserved.