MCPcopy Index your code
hub / github.com/bpython/bpython / pager

Method pager

bpython/curtsiesfrontend/repl.py:2089–2097  ·  view source on GitHub ↗

Runs an external pager on text

(self, text: str, title: str = "")

Source from the content-addressed store, hash-verified

2087 signal.signal(signal.SIGWINCH, prev_sigwinch_handler)
2088
2089 def pager(self, text: str, title: str = "") -> None:
2090 """Runs an external pager on text"""
2091
2092 # TODO: make less handle title
2093 command = get_pager_command()
2094 with tempfile.NamedTemporaryFile() as tmp:
2095 tmp.write(text.encode(getpreferredencoding()))
2096 tmp.flush()
2097 self.focus_on_subprocess(command + [tmp.name])
2098
2099 def show_source(self) -> None:
2100 try:

Callers 3

process_key_eventMethod · 0.95
show_sourceMethod · 0.95
test_helpMethod · 0.45

Calls 5

focus_on_subprocessMethod · 0.95
get_pager_commandFunction · 0.85
getpreferredencodingFunction · 0.85
writeMethod · 0.45
flushMethod · 0.45

Tested by 1

test_helpMethod · 0.36