Context manager. Yields a writable file-like object which can be used as an output pager. .. versionadded:: 8.4.0 :param color: controls if the pager supports ANSI colors or not. The default is autodetection.
(
color: bool | None = None,
)
| 299 | |
| 300 | |
| 301 | def get_pager_file( |
| 302 | color: bool | None = None, |
| 303 | ) -> t.ContextManager[t.TextIO]: |
| 304 | """Context manager. |
| 305 | |
| 306 | Yields a writable file-like object which can be used as an output pager. |
| 307 | |
| 308 | .. versionadded:: 8.4.0 |
| 309 | |
| 310 | :param color: controls if the pager supports ANSI colors or not. The |
| 311 | default is autodetection. |
| 312 | """ |
| 313 | from ._termui_impl import get_pager_file |
| 314 | |
| 315 | color = resolve_color_default(color) |
| 316 | |
| 317 | return get_pager_file(color=color) |
| 318 | |
| 319 | |
| 320 | def echo_via_pager( |
no test coverage detected