def GetProperties(obj, propList):
 bRetList = 1
 if (type(propList) not in [TupleType, ListType]):
  bRetList = 0
  propList = (propList,)
 realPropList = []
 rc = []
 for prop in propList:
  if (type(prop) != IntType):
   props = ((mapi.PS_PUBLIC_STRINGS, prop),)
   propIds = obj.GetIDsFromNames(props, 0)
   prop = mapitags.PROP_TAG(mapitags.PT_UNSPECIFIED, mapitags.PROP_ID(propIds[0]))
  realPropList.append(prop)
 (hr, data) = obj.GetProps(realPropList, 0)
 if (hr != 0):
  data = None
  return None
 if bRetList:
  return [v[1] for v in data]
 else:
  return data[0][1]

def GetProperties ( obj , propList ) : bRetList = 1 if ( type ( propList ) not in [ TupleType , ListType ] ) : bRetList = 0 propList = ( propList , ) realPropList = [ ] rc = [ ] for prop in propList : if ( type ( prop ) != IntType ) : props = ( ( mapi . PS_PUBLIC_STRINGS , prop ) , ) propIds = obj . GetIDsFromNames ( props , 0 ) prop = mapitags . PROP_TAG ( mapitags . PT_UNSPECIFIED , mapitags . PROP_ID ( propIds [ 0 ] ) ) realPropList . append ( prop ) ( hr , data ) = obj . GetProps ( realPropList , 0 ) if ( hr != 0 ) : data = None return None if bRetList : return [ v [ 1 ] for v in data ] else : return data [ 0 ] [ 1 ]
given a mapi object and a list of properties .