MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _escape_stdout

Function _escape_stdout

tools/python-3.11.9-amd64/Lib/pydoc.py:1717–1720  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

1715 os.system(cmd + ' "' + filename + '"')
1716
1717def _escape_stdout(text):
1718 # Escape non-encodable characters to avoid encoding errors later
1719 encoding = getattr(sys.stdout, 'encoding', None) or 'utf-8'
1720 return text.encode(encoding, 'backslashreplace').decode(encoding)
1721
1722def ttypager(text):
1723 """Page through text on a text terminal."""

Callers 2

ttypagerFunction · 0.85
plainpagerFunction · 0.85

Calls 2

decodeMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected