def has_sound(sound):
 try:
  if (ctypes.windll.winmm.mixerGetNumDevs() is 0):
   return False
  key = _winreg.OpenKeyEx(_winreg.HKEY_CURRENT_USER, 'AppEvents\\Schemes\\Apps\\.Default\\{0}\\.Default'.format(sound))
  value = _winreg.EnumValue(key, 0)[1]
  if (value is not u''):
   return True
  else:
   return False
 except WindowsError:
  return False

def has_sound ( sound ) : try : if ( ctypes . windll . winmm . mixerGetNumDevs ( ) is 0 ) : return False key = _winreg . OpenKeyEx ( _winreg . HKEY_CURRENT_USER , 'AppEvents\\Schemes\\Apps\\.Default\\{0}\\.Default' . format ( sound ) ) value = _winreg . EnumValue ( key , 0 ) [ 1 ] if ( value is not u'' ) : return True else : return False except WindowsError : return False
find out if a particular event is configured with a default sound .