This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: IDLE: Update offline doc locations for linux
Type: enhancement Stage: patch review
Components: IDLE Versions: Python 3.10
Status: open Resolution:
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: Rostyslav.Dzinko, ned.deily, roger.serwy, terry.reedy
Priority: normal Keywords: patch

Created on 2012-08-29 11:23 by Rostyslav.Dzinko, last changed 2022-04-11 14:57 by admin.

File name Uploaded Description Edit
issue15808_idle_doc_paths.patch ned.deily, 2012-08-30 01:42 review
Messages (3)
msg169365 - (view) Author: Rostyslav Dzinko (Rostyslav.Dzinko) Date: 2012-08-29 11:23
There's a possibility to add additional help sources in IDLE via

    Options -> Configure IDLE... -> General -> Additional Help Sources

Use case:

> If someone wants to download certain version of Python documentation in HTML and specify local "index.html" to be opened by custom menu item which appears the in Help menu.


> It's not possible to assign custom hot-key (Options -> Configure IDLE... -> Keys) for such menu items or reassign <F1> to that new menu-item, which actually makes sense when talking in context of the use case specified above.

This use case was taken from real life (stackoverflow site):
msg169414 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2012-08-29 20:02
Actually, IDLE does have code to look for an on-disk copy of the html-formatted Python documentation set but the paths are platform-specific and, in the Linux case, are out-of-date for some distributions at least.  For Linux platforms it looks for `index.html` in either `/var/www/html/python` or `/usr/share/doc/python-docs-x.y/Doc/`.  On current Debian systems, for example, the Python doc package is installed in `/usr/share/doc/pythonx.y-doc/html`.  If you install the doc packages and then create a link, IDLE should find the docs off-line when you select `Python Docs` from the `Help` manual.  For example, for Python 3.3 you *could* do:

    sudo aptitude install python3.3-doc
    sudo mkdir -p /var/www/html/
    sudo ln -s /usr/share/doc/python3.3-doc/html python

That said, the default locations should be updated. And perhaps a more useful customization would be to add a user configuration option for where to look for the on-disk copy of the docs rather than adding another hot key. (Also, older versions of Python are in security fix mode only.)
msg169426 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2012-08-30 01:30
Here's a patch to update the doc paths to include current ones for Debian/Ubuntu and Fedora.  The patch will have to be tweaked a bit for 3.2/2.7 to change sys.base_prefix to sys.prefix.
Date User Action Args
2022-04-11 14:57:35adminsetgithub: 60012
2020-06-08 01:11:18terry.reedysettitle: IDLE: Update offline doc locations -> IDLE: Update offline doc locations for linux
2020-06-08 01:09:28terry.reedysettitle: Possibility of setting custom key bindings for "Additional help sources" menu items -> IDLE: Update offline doc locations
versions: + Python 3.10, - Python 3.6, Python 3.7
2017-06-30 00:52:47terry.reedysetassignee: terry.reedy
versions: + Python 3.6, Python 3.7, - Python 2.7, Python 3.4, Python 3.5
2014-10-03 03:47:23terry.reedysetnosy: + terry.reedy
2014-10-03 03:47:05terry.reedysetversions: + Python 3.5, - Python 3.2, Python 3.3
2012-10-25 03:32:10roger.serwysetnosy: + roger.serwy
2012-08-30 01:42:02ned.deilysetfiles: + issue15808_idle_doc_paths.patch
2012-08-30 01:40:56ned.deilysetfiles: - issue15808_idle_doc_paths.patch
2012-08-30 01:30:35ned.deilysetfiles: + issue15808_idle_doc_paths.patch
keywords: + patch
messages: + msg169426

stage: needs patch -> patch review
2012-08-29 20:02:27ned.deilysetversions: - Python 2.6, Python 3.1
nosy: + ned.deily

messages: + msg169414

stage: needs patch
2012-08-29 11:24:08Rostyslav.Dzinkosetversions: - 3rd party
2012-08-29 11:23:43Rostyslav.Dzinkocreate