Python turtle.speed() Examples

The following are 2 code examples of turtle.speed(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module turtle , or try the search function .
Example #1
Source File: xzpq.py    From You-are-Pythonista with GNU General Public License v3.0 5 votes vote down vote up
def init_pen():
    '''
    初始化画笔的一些属性
    '''
    t.pensize(4)  # 设置画笔的大小
    t.colormode(255)  # 设置GBK颜色范围为0-255
    t.color((255, 155, 192), "pink")  # 设置画笔颜色和填充颜色(pink)
    t.setup(900, 500)  # 设置主窗口的大小为900*500
    t.speed(10)  # 设置画笔速度为10 
Example #2
Source File: circles-picture.py    From advancedpython3 with GNU General Public License v3.0 4 votes vote down vote up
def setup_window():
    # Set up the window
    turtle.title('Circles in My Mind')
    turtle.setup(WIDTH, HEIGHT, 0, 0)
    turtle.colormode(255)  # Indicates RGB numbers will be in the range 0 to 255
    turtle.hideturtle()
    # Batch drawing to the screen for faster rendering
    turtle.tracer(2000)

    # Speed up drawing process
    turtle.speed(10)
    turtle.penup()