Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9e218af

Browse files
miss-islingtonstefanorYhg1s
authored
[3.13] Support the "pager" binary in _pyrepl (GH-122878) (#124242)
Support the "pager" binary in _pyrepl (GH-122878)Debian (and derivatives) provide a /usr/bin/pager binary, managed by thealternatives system, that always points to an available pager utility.Allow _pyrepl to use it, to follow system policy.This is a very trivial change, from a patch that Debian has beencarrying since 2.7 era. Seems appropriate to upstream.https://bugs.debian.org/799555(cherry picked from commit426569e)Co-authored-by: Stefano Rivera <stefano@rivera.za.net>Co-authored-by: T. Wouters <thomas@python.org>
1 parentd432fa4 commit9e218af

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

‎Lib/_pyrepl/pager.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ def get_pager() -> Pager:
3636
returnplain_pager
3737
ifsys.platform=='win32':
3838
returnlambdatext,title='':tempfile_pager(plain(text),'more <')
39+
ifhasattr(os,'system')andos.system('(pager) 2>/dev/null')==0:
40+
returnlambdatext,title='':pipe_pager(text,'pager',title)
3941
ifhasattr(os,'system')andos.system('(less) 2>/dev/null')==0:
4042
returnlambdatext,title='':pipe_pager(text,'less',title)
4143

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Use the ``pager`` binary, if available (e.g. on Debian and derivatives), to display REPL ``help()``.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp