turtle.screensize()¶
-
turtle.screensize(canvwidth=None, canvheight=None, bg=None)¶ Resize the canvas the turtles are drawing on.
Optional arguments: canvwidth – positive integer, new width of canvas in pixels canvheight – positive integer, new height of canvas in pixels bg – colorstring or color-tuple, new backgroundcolor If no arguments are given, return current (canvaswidth, canvasheight)
Do not alter the drawing window. To observe hidden parts of the canvas use the scrollbars. (Can make visible those parts of a drawing, which were outside the canvas before!)
Example (for a Turtle instance named turtle): >>> turtle.screensize(2000,1500) >>> # e. g. to search for an erroneously escaped turtle ;-)