New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IDLE: Update offline doc locations for linux #60012
Comments
|
There's a possibility to add additional help sources in IDLE via Use case:
Problem:
This use case was taken from real life (stackoverflow site): http://stackoverflow.com/questions/12174255/linking-offline-documentation-to-idle-linux |
|
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 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.) |
|
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. |
|
Summer 2012 is about when I started doing non-trivial IDLE patches. Sorry I never really focused on this before. On Windows, the chm file has been replaced by an html copy. #95841 patches the current code to use the registry to find the latter; it is possible that it already has a 'file:' prefix. I will merge this PR first. #95844 is about extracting this code into a module-level function. I suspect that the 'new' linux/macOS locations might now be obsolete again. However, the bpo patch will be a start. To make the code more robust, it could look in help sources for 'Offline Python Docs' and start the location list with anything it finds. |
In recent versions of Ubuntu (22.04, 20.04, 18.04), the location is I think the best option is to have a configurable variable for search paths, which can be set by package maintainers to ensure consistency with their python docs package. |
|
System configuration variables are exposed in the sys module. I have no idea how things get there. But IDLE can at least look through known possibilities. The Ubuntu path is one that Ned proposed adding a decade ago, so paths may be fairly stable on each system even if diverse across them. And I can add an escape mechanism for user to add something. |


RostyslavDzinko mannequin commentedAug 29, 2012
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: