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
117a05ed
Commit
117a05ed
authored
Mar 02, 2007
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #1628895: some better tries to find HTML documentation in pydoc.
parent
7659a87e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
Lib/pydoc.py
Lib/pydoc.py
+12
-7
No files found.
Lib/pydoc.py
View file @
117a05ed
...
...
@@ -1627,16 +1627,21 @@ class Helper:
self
.
docdir
=
None
execdir
=
os
.
path
.
dirname
(
sys
.
executable
)
homedir
=
os
.
environ
.
get
(
'PYTHONHOME'
)
join
=
os
.
path
.
join
for
dir
in
[
os
.
environ
.
get
(
'PYTHONDOCS'
),
homedir
and
os
.
path
.
join
(
homedir
,
'doc'
),
os
.
path
.
join
(
execdir
,
'doc'
),
'/usr/doc/python-docs-'
+
split
(
sys
.
version
)[
0
]
,
'/usr/doc/python-'
+
split
(
sys
.
version
)[
0
]
,
'/usr/doc/python-docs-'
+
sys
.
version
[:
3
]
,
'/usr/doc/python-'
+
sys
.
version
[:
3
]
,
os
.
path
.
join
(
sys
.
prefix
,
'Resources/English.lproj/Documentation'
)]:
if
dir
and
os
.
path
.
isdir
(
os
.
path
.
join
(
dir
,
'lib'
)):
join
(
execdir
,
'doc'
),
# for Windows
join
(
sys
.
prefix
,
'doc/python-docs-'
+
split
(
sys
.
version
)[
0
])
,
join
(
sys
.
prefix
,
'doc/python-'
+
split
(
sys
.
version
)[
0
])
,
join
(
sys
.
prefix
,
'doc/python-docs-'
+
sys
.
version
[:
3
])
,
join
(
sys
.
prefix
,
'doc/python-'
+
sys
.
version
[:
3
])
,
join
(
sys
.
prefix
,
'Resources/English.lproj/Documentation'
)]:
if
dir
and
os
.
path
.
isdir
(
join
(
dir
,
'lib'
)):
self
.
docdir
=
dir
break
if
dir
and
os
.
path
.
isdir
(
join
(
dir
,
'html'
,
'lib'
)):
self
.
docdir
=
join
(
dir
,
'html'
)
break
def
__repr__
(
self
):
if
inspect
.
stack
()[
1
][
3
]
==
'?'
:
...
...
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