MCPcopy Index your code
hub / github.com/python/cpython / _window_size

Method _window_size

Lib/turtle.py:781–790  ·  view source on GitHub ↗

Return the width and height of the turtle window.

(self)

Source from the content-addressed store, hash-verified

779 self.cv.reset(canvwidth, canvheight, bg)
780
781 def _window_size(self):
782 """ Return the width and height of the turtle window.
783 """
784 width = self.cv.winfo_width()
785 if width <= 1: # the window isn't managed by a geometry manager
786 width = self.cv['width']
787 height = self.cv.winfo_height()
788 if height <= 1: # the window isn't managed by a geometry manager
789 height = self.cv['height']
790 return width, height
791
792 def mainloop(self):
793 """Starts event loop - calling Tkinter&#x27;s mainloop function.

Callers 3

setworldcoordinatesMethod · 0.80
window_widthMethod · 0.80
window_heightMethod · 0.80

Calls 2

winfo_widthMethod · 0.80
winfo_heightMethod · 0.80

Tested by

no test coverage detected