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

Function paint_last_events

bpython/curtsiesfrontend/replpainter.py:254–275  ·  view source on GitHub ↗
(rows, columns, names, config)

Source from the content-addressed store, hash-verified

252
253
254def paint_last_events(rows, columns, names, config):
255 if not names:
256 return fsarray([])
257 width = min(max(len(name) for name in names), columns - 2)
258 output_lines = []
259 output_lines.append(
260 config.left_top_corner
261 + config.top_border * width
262 + config.right_top_corner
263 )
264 for name in reversed(names[max(0, len(names) - (rows - 2)) :]):
265 output_lines.append(
266 config.left_border
267 + name[:width].center(width)
268 + config.right_border
269 )
270 output_lines.append(
271 config.left_bottom_corner
272 + config.bottom_border * width
273 + config.right_bottom_corner
274 )
275 return fsarray(output_lines)
276
277
278def paint_statusbar(rows, columns, msg, config):

Callers

nothing calls this directly

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected