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

[3.14] gh-138897: Use_pyrepl.pager for_sitebuiltins._Printer (GH-138898)#143364

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ambv merged 1 commit intopython:3.14frommiss-islington:backport-0417dab-3.14
Jan 2, 2026
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 6 additions & 18 deletionsLib/_sitebuiltins.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -36,7 +36,7 @@ def __init__(self, name, data, files=(), dirs=()):
importos
self.__name=name
self.__data=data
self.__lines=None
self.__lines=[]
self.__filenames= [os.path.join(dir,filename)
fordirindirs
forfilenameinfiles]
Expand DownExpand Up@@ -65,24 +65,12 @@ def __repr__(self):
return"Type %s() to see the full %s text"% ((self.__name,)*2)

def__call__(self):
from_pyrepl.pagerimportget_pager
self.__setup()
prompt='Hit Return for more, or q (and Return) to quit: '
lineno=0
while1:
try:
foriinrange(lineno,lineno+self.MAXLINES):
print(self.__lines[i])
exceptIndexError:
break
else:
lineno+=self.MAXLINES
key=None
whilekeyisNone:
key=input(prompt)
ifkeynotin ('','q'):
key=None
ifkey=='q':
break

pager=get_pager()
text="\n".join(self.__lines)
pager(text,title=self.__name)


class_Helper(object):
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
Improved :data:`license`/:data:`copyright`/:data:`credits` display in the
:term:`REPL`: now uses a pager.
Loading

[8]ページ先頭

©2009-2026 Movatter.jp