turtle.width()

turtle.width(width=None) Parameters: width – a positive number Set the line thickness to width or return it. If resizemode is set to “auto” and turtleshape is a polygon, that polygon is drawn with the same line thickness. If no argument is given, the current pensize is returned. >>> turtle.pensize() 1 >>> turtle.pensize(10) # from here on lines of width 10 are drawn

turtle.Vec2D

class turtle.Vec2D(x, y) A two-dimensional vector class, used as a helper class for implementing turtle graphics. May be useful for turtle graphics programs too. Derived from tuple, so a vector is a tuple! Provides (for a, b vectors, k number): a + b vector addition a - b vector subtraction a * b inner product k * a and a * k multiplication with scalar abs(a) absolute value of a a.rotate(angle) rotation

turtle.update()

turtle.update() Perform a TurtleScreen update. To be used when tracer is turned off.

turtle.up()

turtle.up() Pull the pen up – no drawing when moving.

turtle.undobufferentries()

turtle.undobufferentries() Return number of entries in the undobuffer. >>> while undobufferentries(): ... undo()

turtle.undo()

turtle.undo() Undo (repeatedly) the last turtle action(s). Number of available undo actions is determined by the size of the undobuffer. >>> for i in range(4): ... turtle.fd(50); turtle.lt(80) ... >>> for i in range(8): ... turtle.undo()

turtle.turtlesize()

turtle.turtlesize(stretch_wid=None, stretch_len=None, outline=None) Parameters: stretch_wid – positive number stretch_len – positive number outline – positive number Return or set the pen’s attributes x/y-stretchfactors and/or outline. Set resizemode to “user”. If and only if resizemode is set to “user”, the turtle will be displayed stretched according to its stretchfactors: stretch_wid is stretchfactor perpendicular to its orientation, stretch_len is stretchfactor in direction of its

turtle.TurtleScreen

class turtle.TurtleScreen(cv) Parameters: cv – a tkinter.Canvas Provides screen oriented methods like setbg() etc. that are described above.

turtle.turtles()

turtle.turtles() Return the list of turtles on the screen. >>> for turtle in screen.turtles(): ... turtle.color("red")

turtle.Turtle

class turtle.Turtle Subclass of RawTurtle, has the same interface but draws on a default Screen object created automatically when needed for the first time.