Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
46e92503
Commit
46e92503
authored
Nov 28, 2014
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #22314: pydoc now works when the LINES environment variable is set.
parent
86ef95d3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
Lib/pydoc.py
Lib/pydoc.py
+7
-1
Misc/NEWS
Misc/NEWS
+2
-0
No files found.
Lib/pydoc.py
View file @
46e92503
...
...
@@ -1446,7 +1446,13 @@ def ttypager(text):
getchar
=
lambda
:
sys
.
stdin
.
readline
()[:
-
1
][:
1
]
try
:
r
=
inc
=
os
.
environ
.
get
(
'LINES'
,
25
)
-
1
try
:
h
=
int
(
os
.
environ
.
get
(
'LINES'
,
0
))
except
ValueError
:
h
=
0
if
h
<=
1
:
h
=
25
r
=
inc
=
h
-
1
sys
.
stdout
.
write
(
join
(
lines
[:
inc
],
'
\
n
'
)
+
'
\
n
'
)
while
lines
[
r
:]:
sys
.
stdout
.
write
(
'-- more --'
)
...
...
Misc/NEWS
View file @
46e92503
...
...
@@ -25,6 +25,8 @@ Documentation
Tools/Demos
-----------
- Issue #22314: pydoc now works when the LINES environment variable is set.
- Issue #18905: "pydoc -p 0" now outputs actually used port. Based on patch by
Wieland Hoffmann.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment