mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-17 00:07:37 +02:00
add pager functionality to parser documentation
This commit is contained in:
@ -29,6 +29,15 @@ def _safe_print(string: str, sep=' ', end='\n', file=sys.stdout, flush=False) ->
|
||||
print(_asciify(string), sep=sep, end=end, file=file, flush=flush)
|
||||
|
||||
|
||||
def _safe_pager(string: str) -> None:
|
||||
"""Pager output for both UTF-8 and ASCII encoding systems"""
|
||||
from pydoc import pager
|
||||
try:
|
||||
pager(string)
|
||||
except UnicodeEncodeError:
|
||||
pager(_asciify(string))
|
||||
|
||||
|
||||
def warning_message(message_lines: List[str]) -> None:
|
||||
"""
|
||||
Prints warning message to `STDERR` for non-fatal issues. The first line
|
||||
|
Reference in New Issue
Block a user