Steve Dower <steve.do...@python.org> added the comment:

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}/";

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue47086>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to