def setActivePrivacyList(disp, listname=None, typ='active'):
 if listname:
  attrs = {'name': listname}
 else:
  attrs = {}
 resp = disp.SendAndWaitForResponse(Iq('set', NS_PRIVACY, payload=[Node(typ, attrs)]))
 if isResultNode(resp):
  return 1

def setActivePrivacyList ( disp , listname = None , typ = 'active' ) : if listname : attrs = { 'name' : listname } else : attrs = { } resp = disp . SendAndWaitForResponse ( Iq ( 'set' , NS_PRIVACY , payload = [ Node ( typ , attrs ) ] ) ) if isResultNode ( resp ) : return 1
switches privacy list listname to specified type .