MCPcopy
hub / github.com/Textualize/rich / end_capture

Method end_capture

rich/console.py:870–879  ·  view source on GitHub ↗

End capture mode and return captured string. Returns: str: Console output.

(self)

Source from the content-addressed store, hash-verified

868 self._enter_buffer()
869
870 def end_capture(self) -> str:
871 """End capture mode and return captured string.
872
873 Returns:
874 str: Console output.
875 """
876 render_result = self._render_buffer(self._buffer)
877 del self._buffer[:]
878 self._exit_buffer()
879 return render_result
880
881 def push_theme(self, theme: Theme, *, inherit: bool = True) -> None:
882 """Push a new theme on to the top of the stack, replacing the styles from the previous theme.

Callers 15

test_expand_falseFunction · 0.95
test_vertical_centerFunction · 0.95
test_min_widthFunction · 0.95
test_no_columnsFunction · 0.95
test_decodeFunction · 0.95
test_justifyFunction · 0.95
test_render_escapeFunction · 0.95
test_render_single_nodeFunction · 0.95

Calls 2

_render_bufferMethod · 0.95
_exit_bufferMethod · 0.95

Tested by 15

test_expand_falseFunction · 0.76
test_vertical_centerFunction · 0.76
test_min_widthFunction · 0.76
test_no_columnsFunction · 0.76
test_decodeFunction · 0.76
test_justifyFunction · 0.76
test_render_escapeFunction · 0.76
test_render_single_nodeFunction · 0.76