python - 有没有办法可以设置 python turtle 的背景颜色?

标签 python turtle-graphics

我正在尝试设置我的 turtle graphics 的背景颜色,有没有办法可以设置 python turtle 的背景颜色?

最佳答案

使用 turtle.bgcolor(*args)

例如:

import turtle  
turtle.bgcolor("black")

from turtle import *
bgcolor("black")

阅读文档在 http://docs.python.org/library/turtle.html#turtle.bgcolor

关于python - 有没有办法可以设置 python turtle 的背景颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5813135/

相关文章:

python - 用于更高性能计算的 c++ gis/spatial 库

python - 密码重置链接重定向到解释域页面

python - 尝试将一列日期减去另一个日期

python - 如何在 Python 3 中解析字节串?

Python 类型错误 : 'list' object cannot be interpreted as an integer

python - turtle 多边形边界位置

python - ipyparallel 异常 : "You have attempted to connect to an IPython Cluster but no Controller could be found"

python - 为 turtle 构建内置文本字段,while 语句不起作用

Python Turtle 图形窗口仅短暂打开然后关闭

python - 计算执行不同参数的函数的次数,然后在按下 ENTER 键时重置计数