def find_versions_fc(abi): base = _winreg.HKEY_LOCAL_MACHINE key = os.path.join(_FC_ROOT[abi], "Fortran") availables = {} versions = read_keys(base, key) if versions is None: return availables for v in versions: verk = os.path.join(key, v) key = open_key(verk) try: maj = _winreg.QueryValueEx(key, "Major Version")[0] min = _winreg.QueryValueEx(key, "Minor Version")[0] bld = _winreg.QueryValueEx(key, "Revision")[0] availables[(maj, min, bld)] = verk finally: close_key(key) return availables
def product_dir_fc(root): k = open_key(root) try: return _winreg.QueryValueEx(k, "ProductDir")[0] finally: close_key(k)