From: Andrew M. Kuchling Date: Thu, 11 Dec 2008 02:09:36 +0000 (+0000) Subject: #4259: update the URL pattern for module documentation X-Git-Tag: v2.5.3c1~13 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2443efb7ed36d104c254f968ddb823e4de20915c;p=thirdparty%2FPython%2Fcpython.git #4259: update the URL pattern for module documentation --- diff --git a/Lib/pydoc.py b/Lib/pydoc.py index 883ead01e373..33b9f3848542 100755 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -27,7 +27,7 @@ to a file named ".html". Module docs for core modules are assumed to be in - http://www.python.org/doc/current/lib/ + http://www.python.org/doc//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