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

Function get_displaylines

Lib/idlelib/sidebar.py:26–30  ·  view source on GitHub ↗

Display height, in lines, of a logical line in a Tk text widget.

(text, index)

Source from the content-addressed store, hash-verified

24
25
26def get_displaylines(text, index):
27 """Display height, in lines, of a logical line in a Tk text widget."""
28 return text.count(f"{index} linestart",
29 f"{index} lineend",
30 "displaylines", return_ints=True)
31
32def get_widget_padding(widget):
33 """Get the total padding of a Tk widget, including its border."""

Callers 2

insertMethod · 0.85
deleteMethod · 0.85

Calls 1

countMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…