src/eric7/SystemUtilities/PythonUtilities.py

branch
eric7
changeset 11148
15e30f0c76a8
parent 11090
f5f5f5803935
equal deleted inserted replaced
11147:dee6e106b4d3 11148:15e30f0c76a8
164 @type list of str (optional) 164 @type list of str (optional)
165 @return list of found interpreter executables 165 @return list of found interpreter executables
166 @rtype list of str 166 @rtype list of str
167 """ 167 """
168 try: 168 try:
169 import winreg # noqa: I101, I103 169 import winreg # noqa: I-101, I-103
170 except ImportError: 170 except ImportError:
171 import _winreg as winreg # noqa: I101, I102 171 import _winreg as winreg # noqa: I-101, I-102
172 172
173 def getExePath(branch, access, versionStr): 173 def getExePath(branch, access, versionStr):
174 with contextlib.suppress(WindowsError, OSError): 174 with contextlib.suppress(WindowsError, OSError):
175 software = winreg.OpenKey(branch, "Software", 0, access) 175 software = winreg.OpenKey(branch, "Software", 0, access)
176 python = winreg.OpenKey(software, "Python", 0, access) 176 python = winreg.OpenKey(software, "Python", 0, access)

eric ide

mercurial