class documentation

class Pager(TextIO):

Constructor: Pager(pager_cmd)

View In Hierarchy

File-like object that pages output through external pager programs.

Method __enter__ Context manager entry.
Method __exit__ Context manager exit.
Method __init__ Initialize Pager.
Method __iter__ Return iterator (not supported).
Method __next__ Return next line (not supported).
Method close Close the pager.
Method fileno Return the file descriptor (not supported).
Method flush Flush the pager.
Method isatty Return whether the pager is a TTY.
Method read Read from the pager (not supported).
Method readable Return whether the pager is readable (it's not).
Method readline Read a line from the pager (not supported).
Method readlines Read lines from the pager (not supported).
Method seek Seek in the pager (not supported).
Method seekable Return whether the pager is seekable (it's not).
Method tell Return the current position (not supported).
Method truncate Truncate the pager (not supported).
Method writable Return whether the pager is writable.
Method write Write text to the pager.
Method writelines Write a list of lines to the pager.
Instance Variable pager_cmd Undocumented
Instance Variable pager_process Undocumented
Property buffer Return the underlying binary buffer.
Property closed Return whether the pager is closed.
Property encoding Return the encoding used.
Property errors Return the error handling scheme.
Property line_buffering Return whether line buffering is enabled.
Property mode Return the mode.
Property name Return the name.
Property newlines Return the newlines mode.
Method _ensure_pager_started Start the pager process if not already started.
Method _get_pager_command Get the pager command to use.
Instance Variable _buffer Undocumented
Instance Variable _closed Undocumented
Instance Variable _pager_died Undocumented
def __enter__(self) -> Pager:

Context manager entry.

def __exit__(self, exc_type: type | None, exc_val: BaseException | None, exc_tb: types.TracebackType | None):

Context manager exit.

def __init__(self, pager_cmd: str = 'cat'):

Initialize Pager.

Parameters
pager_cmd:strCommand to use for paging (default: "cat")
def __iter__(self) -> Pager:

Return iterator (not supported).

def __next__(self) -> str:

Return next line (not supported).

def close(self):

Close the pager.

def fileno(self) -> int:

Return the file descriptor (not supported).

def flush(self):

Flush the pager.

def isatty(self) -> bool:

Return whether the pager is a TTY.

def read(self, size: int = -1) -> str:

Read from the pager (not supported).

def readable(self) -> bool:

Return whether the pager is readable (it's not).

def readline(self, size: int = -1) -> str:

Read a line from the pager (not supported).

def readlines(self, hint: int = -1) -> list[str]:

Read lines from the pager (not supported).

def seek(self, offset: int, whence: int = 0) -> int:

Seek in the pager (not supported).

def seekable(self) -> bool:

Return whether the pager is seekable (it's not).

def tell(self) -> int:

Return the current position (not supported).

def truncate(self, size: int | None = None) -> int:

Truncate the pager (not supported).

def writable(self) -> bool:

Return whether the pager is writable.

def write(self, text: str) -> int:

Write text to the pager.

def writelines(self, lines: Iterable[str]):

Write a list of lines to the pager.

pager_cmd =

Undocumented

pager_process: subprocess.Popen[str] | None =

Undocumented

Return the underlying binary buffer.

closed: bool =

Return whether the pager is closed.

encoding: str =

Return the encoding used.

errors: str | None =

Return the error handling scheme.

line_buffering: bool =

Return whether line buffering is enabled.

mode: str =

Return the mode.

name: str =

Return the name.

newlines: str | tuple[str, ...] | None =

Return the newlines mode.

def _ensure_pager_started(self):

Start the pager process if not already started.

def _get_pager_command(self) -> str:

Get the pager command to use.

_buffer =

Undocumented

_closed: bool =

Undocumented

_pager_died: bool =

Undocumented