Skip to content

Commit 839145e

Browse files
committed
Handle title argument of pydoc.pager (fixes #1029)
1 parent c70fa70 commit 839145e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

bpython/curtsiesfrontend/_internal.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ def __init__(self, repl=None):
5252

5353
super().__init__()
5454

55-
def pager(self, output):
56-
self._repl.pager(output)
55+
def pager(self, output, title=""):
56+
self._repl.pager(output, title)
5757

5858
def __call__(self, *args, **kwargs):
5959
if self._repl.reevaluating:

bpython/curtsiesfrontend/repl.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2101,10 +2101,10 @@ def focus_on_subprocess(self, args):
21012101
finally:
21022102
signal.signal(signal.SIGWINCH, prev_sigwinch_handler)
21032103

2104-
def pager(self, text: str) -> None:
2105-
"""Runs an external pager on text
2104+
def pager(self, text: str, title: str = "") -> None:
2105+
"""Runs an external pager on text"""
21062106

2107-
text must be a str"""
2107+
# TODO: make less handle title
21082108
command = get_pager_command()
21092109
with tempfile.NamedTemporaryFile() as tmp:
21102110
tmp.write(text.encode(getpreferredencoding()))

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy