parameters: (key, value)
docstring: Use the _winreg module to obtain the value of a registry key.
  
    Args:
      key: The registry key.
      value: The particular registry value to read.
    Return:
      contents of the registry key's value, or None on failure.  Throws
      ImportError if _winreg is unavailable.
docstring_summary: Use the _winreg module to obtain the value of a registry key.
docstring_tokens: Use the _winreg module to obtain the value of a registry key .
function: def _RegistryGetValueUsingWinReg(key, value):
    """Use the _winreg module to obtain the value of a registry key.
  
    Args:
      key: The registry key.
      value: The particular registry value to read.
    Return:
      contents of the registry key's value, or None on failure.  Throws
      ImportError if _winreg is unavailable.
    """
    try:
      # Python 2
      from _winreg import HKEY_LOCAL_MACHINE, OpenKey, QueryValueEx
    except ImportError:
      # Python 3
      from winreg import HKEY_LOCAL_MACHINE, OpenKey, QueryValueEx
  
    try:
      root, subkey = key.split('\\', 1)
      assert root == 'HKLM'  # Only need HKLM for now.
      with OpenKey(HKEY_LOCAL_MACHINE, subkey) as hkey:
        return QueryValueEx(hkey, value)[0]
    except WindowsError:
      return None
function_tokens: def _RegistryGetValueUsingWinReg ( key , value ) : try : # Python 2 from _winreg import HKEY_LOCAL_MACHINE , OpenKey , QueryValueEx except ImportError : # Python 3 from winreg import HKEY_LOCAL_MACHINE , OpenKey , QueryValueEx try : root , subkey = key . split ( '\\' , 1 ) assert root == 'HKLM' # Only need HKLM for now. with OpenKey ( HKEY_LOCAL_MACHINE , subkey ) as hkey : return QueryValueEx ( hkey , value ) [ 0 ] except WindowsError : return None