We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c984ba commit 8ebfe7aCopy full SHA for 8ebfe7a
1 file changed
Lib/_sitebuiltins.py
@@ -9,6 +9,7 @@
9
# globals.
10
11
import sys
12
+from _pyrepl.pager import get_pager
13
14
class Quitter(object):
15
def __init__(self, name, eof):
@@ -66,23 +67,9 @@ def __repr__(self):
66
67
68
def __call__(self):
69
self.__setup()
- prompt = 'Hit Return for more, or q (and Return) to quit: '
70
- lineno = 0
71
- while 1:
72
- try:
73
- for i in range(lineno, lineno + self.MAXLINES):
74
- print(self.__lines[i])
75
- except IndexError:
76
- break
77
- else:
78
- lineno += self.MAXLINES
79
- key = None
80
- while key is None:
81
- key = input(prompt)
82
- if key not in ('', 'q'):
83
84
- if key == 'q':
85
+ pager = get_pager()
+ text = "\n".join(self.__lines)
+ pager(text, title=self.__name)
86
87
88
class _Helper(object):
0 commit comments