ucscsdk/ucscgenutils.py
def check_registry_key(java_key):
    """ Method checks for the java in the registry entries. """
    try:
        from _winreg import ConnectRegistry, HKEY_LOCAL_MACHINE, OpenKey, \
            QueryValueEx
    except:
        from winreg import ConnectRegistry, HKEY_LOCAL_MACHINE, OpenKey, \
            QueryValueEx

    path = None
    try:
        a_reg = ConnectRegistry(None, HKEY_LOCAL_MACHINE)
        r_key = OpenKey(a_reg, java_key)
        for i_cnt in range(1024):
            current_version = QueryValueEx(r_key, "CurrentVersion")
            if current_version is not None:
                key = OpenKey(r_key, current_version[0])
                if key is not None:
                    path = QueryValueEx(key, "JavaHome")
                    return path[0]
    except Exception:
        UcscWarning("Not able to access registry.")
        return None
 Method checks for the java in the registry entries. 
Method checks for the java in the registry entries.
Method checks for the java in the registry entries .
def check_registry_key(java_key):
    try:
        from _winreg import ConnectRegistry, HKEY_LOCAL_MACHINE, OpenKey, \
            QueryValueEx
    except:
        from winreg import ConnectRegistry, HKEY_LOCAL_MACHINE, OpenKey, \
            QueryValueEx
    path = None
    try:
        a_reg = ConnectRegistry(None, HKEY_LOCAL_MACHINE)
        r_key = OpenKey(a_reg, java_key)
        for i_cnt in range(1024):
            current_version = QueryValueEx(r_key, "CurrentVersion")
            if current_version is not None:
                key = OpenKey(r_key, current_version[0])
                if key is not None:
                    path = QueryValueEx(key, "JavaHome")
                    return path[0]
    except Exception:
        UcscWarning("Not able to access registry.")
        return None
def check_registry_key ( java_key ) : try : from _winreg import ConnectRegistry , HKEY_LOCAL_MACHINE , OpenKey , QueryValueEx except : from winreg import ConnectRegistry , HKEY_LOCAL_MACHINE , OpenKey , QueryValueEx path = None try : a_reg = ConnectRegistry ( None , HKEY_LOCAL_MACHINE ) r_key = OpenKey ( a_reg , java_key ) for i_cnt in range ( 1024 ) : current_version = QueryValueEx ( r_key , "CurrentVersion" ) if current_version is not None : key = OpenKey ( r_key , current_version [ 0 ] ) if key is not None : path = QueryValueEx ( key , "JavaHome" ) return path [ 0 ] except Exception : UcscWarning ( "Not able to access registry." ) return None
Method checks for the java in the registry entries.
Method checks for the java in the registry entries .
""" Method checks for the java in the registry entries. """
java_key