def setActivePrivacyList(disp,listname=None,typ='active'):
    """ Switches privacy list 'listname' to specified type.
        By default the type is 'active'. Returns true on success."""
    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.
        By default the type is 'active'. Returns true on success.
chrome-cordova/gcmServer/xmpp/features.py