summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2008-12-11 02:09:36 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2008-12-11 02:09:36 (GMT)
commit2443efb7ed36d104c254f968ddb823e4de20915c (patch)
tree5f9dc69e9f2c62f3597ba011d89c568f33854a9b
parent6f5d3f326f8c98dc4c53b422a92306e391e83cc2 (diff)
downloadcpython-2443efb7ed36d104c254f968ddb823e4de20915c.zip
cpython-2443efb7ed36d104c254f968ddb823e4de20915c.tar.gz
cpython-2443efb7ed36d104c254f968ddb823e4de20915c.tar.bz2
#4259: update the URL pattern for module documentation
-rwxr-xr-xLib/pydoc.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index 883ead0..33b9f38 100755
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -27,7 +27,7 @@ to a file named "<name>.html".
Module docs for core modules are assumed to be in
- http://www.python.org/doc/current/lib/
+ http://www.python.org/doc/<version>/lib/
This can be overridden by setting the PYTHONDOCS environment variable
to a different URL or to a local directory containing the Library
@@ -345,8 +345,9 @@ class Doc:
except TypeError:
file = '(built-in)'
+ version = '.'.join(str(v) for v in sys.version_info[:3])
docloc = os.environ.get("PYTHONDOCS",
- "http://www.python.org/doc/current/lib")
+ "http://www.python.org/doc/%s/lib" % version)
basedir = os.path.join(sys.exec_prefix, "lib",
"python"+sys.version[0:3])
if (isinstance(object, type(os)) and