MCPcopy Create free account
hub / github.com/bpython/bpython / paint_history

Function paint_history

bpython/curtsiesfrontend/replpainter.py:38–45  ·  view source on GitHub ↗
(rows, columns, display_lines)

Source from the content-addressed store, hash-verified

36
37
38def paint_history(rows, columns, display_lines):
39 lines = []
40 for r, line in zip(range(rows), display_lines[-rows:]):
41 lines.append(fmtstr(line[:columns]))
42 r = fsarray(lines, width=columns)
43 assert r.shape[0] <= rows, repr(r.shape) + " " + repr(rows)
44 assert r.shape[1] <= columns, repr(r.shape) + " " + repr(columns)
45 return r
46
47
48def paint_current_line(rows, columns, current_display_line):

Callers

nothing calls this directly

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected