turtle.window_width()

turtle.window_width() Return the width of the turtle window. >>> screen.window_width() 640

turtle.window_height()

turtle.window_height() Return the height of the turtle window. >>> screen.window_height() 480

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.update()

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

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.TurtleScreen

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

turtle.tracer()

turtle.tracer(n=None, delay=None) Parameters: n – nonnegative integer delay – nonnegative integer Turn turtle animation on/off and set delay for update drawings. If n is given, only each n-th regular screen update is really performed. (Can be used to accelerate the drawing of complex graphics.) When called without arguments, returns the currently stored value of n. Second argument sets delay value (see delay()). >>> screen.tracer(8, 25) >>> dist = 2 >>> for i

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.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.