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.

Author steve.dower
Recipients mdk, ned.deily, paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware
Date 2022-03-23.11:54:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1648036445.77.0.486156416084.issue47086@roundup.psfhosted.org>
In-reply-to
Content
This should work for you (luckily, this is about the simplest possible case):

import sys
import winreg

def get_help():
    KEY = rf"Software\Python\PythonCore\{sys.winver}\Help\Main Python Documentation"
    try:
        return winreg.QueryValue(winreg.HKEY_CURRENT_USER, KEY)
    except FileNotFoundError:
        pass
    try:
        return winreg.QueryValue(winreg.HKEY_LOCAL_MACHINE, KEY)
    except FileNotFoundError:
        pass
    return f"https://docs.python.org/{sys.version_info.major}.{sys.version_info.minor}/"
History
Date User Action Args
2022-03-23 11:54:05steve.dowersetrecipients: + steve.dower, terry.reedy, paul.moore, tim.golden, ned.deily, zach.ware, mdk
2022-03-23 11:54:05steve.dowersetmessageid: <1648036445.77.0.486156416084.issue47086@roundup.psfhosted.org>
2022-03-23 11:54:05steve.dowerlinkissue47086 messages
2022-03-23 11:54:05steve.dowercreate