turtle.getscreen()

turtle.getscreen() Return the TurtleScreen object the turtle is drawing on. TurtleScreen methods can then be called for that object. >>> ts = turtle.getscreen() >>> ts <turtle._Screen object at 0x...> >>> ts.bgcolor("pink")

turtle.getpen()

turtle.getpen() Return the Turtle object itself. Only reasonable use: as a function to return the “anonymous turtle”: >>> pet = getturtle() >>> pet.fd(50) >>> pet <turtle.Turtle object at 0x...>

turtle.getshapes()

turtle.getshapes() Return a list of names of all currently available turtle shapes. >>> screen.getshapes() ['arrow', 'blank', 'circle', ..., 'turtle']

turtle.fd()

turtle.fd(distance) Parameters: distance – a number (integer or float) Move the turtle forward by the specified distance, in the direction the turtle is headed. >>> turtle.position() (0.00,0.00) >>> turtle.forward(25) >>> turtle.position() (25.00,0.00) >>> turtle.forward(-75) >>> turtle.position() (-50.00,0.00)

turtle.filling()

turtle.filling() Return fillstate (True if filling, False else). >>> turtle.begin_fill() >>> if turtle.filling(): ... turtle.pensize(5) ... else: ... turtle.pensize(3)

turtle.forward()

turtle.forward(distance) turtle.fd(distance) Parameters: distance – a number (integer or float) Move the turtle forward by the specified distance, in the direction the turtle is headed. >>> turtle.position() (0.00,0.00) >>> turtle.forward(25) >>> turtle.position() (25.00,0.00) >>> turtle.forward(-75) >>> turtle.position() (-50.00,0.00)

turtle.fillcolor()

turtle.fillcolor(*args) Return or set the fillcolor. Four input formats are allowed: fillcolor() Return the current fillcolor as color specification string, possibly in tuple format (see example). May be used as input to another color/pencolor/fillcolor call. fillcolor(colorstring) Set fillcolor to colorstring, which is a Tk color specification string, such as "red", "yellow", or "#33cc8c". fillcolor((r, g, b)) Set fillcolor to the RGB color represented by the tuple of r, g, and b. Eac

turtle.getcanvas()

turtle.getcanvas() Return the Canvas of this TurtleScreen. Useful for insiders who know what to do with a Tkinter Canvas. >>> cv = screen.getcanvas() >>> cv <turtle.ScrolledCanvas object ...>

turtle.end_fill()

turtle.end_fill() Fill the shape drawn after the last call to begin_fill(). >>> turtle.color("black", "red") >>> turtle.begin_fill() >>> turtle.circle(80) >>> turtle.end_fill()

turtle.exitonclick()

turtle.exitonclick() Bind bye() method to mouse clicks on the Screen. If the value “using_IDLE” in the configuration dictionary is False (default value), also enter mainloop. Remark: If IDLE with the -n switch (no subprocess) is used, this value should be set to True in turtle.cfg. In this case IDLE’s own mainloop is active also for the client script.