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

Method _bgcolor

Lib/turtle.py:574–581  ·  view source on GitHub ↗

Set canvas' backgroundcolor if color is not None, else return backgroundcolor.

(self, color=None)

Source from the content-addressed store, hash-verified

572 return ok
573
574 def _bgcolor(self, color=None):
575 """Set canvas' backgroundcolor if color is not None,
576 else return backgroundcolor."""
577 if color is not None:
578 self.cv.config(bg = color)
579 self._update()
580 else:
581 return self.cv.cget("bg")
582
583 def _write(self, pos, txt, align, font, pencolor):
584 """Write txt at pos in canvas with specified font

Callers 1

bgcolorMethod · 0.80

Calls 3

_updateMethod · 0.95
configMethod · 0.45
cgetMethod · 0.45

Tested by

no test coverage detected