def getevents(clsid):
 clsid = str(pywintypes.IID(clsid))
 klass = gencache.GetClassForCLSID(clsid)
 try:
  return klass.default_source
 except AttributeError:
  try:
   return gencache.GetClassForCLSID(klass.coclass_clsid).default_source
  except AttributeError:
   return None

def getevents ( clsid ) : clsid = str ( pywintypes . IID ( clsid ) ) klass = gencache . GetClassForCLSID ( clsid ) try : return klass . default_source except AttributeError : try : return gencache . GetClassForCLSID ( klass . coclass_clsid ) . default_source except AttributeError : return None
determine the default outgoing interface for a class .