[python-ldap] Capture Results

Tom Tucker tktucker at gmail.com
Mon Nov 21 21:30:01 CET 2011


How do I display the results from my last add, change or delete?  I am
missing something using the "result" method.
Thank you in advance.




        l = ldap.initialize("ldap://localhost:389/")
        dn = "uid=%s,ou=people,dc=autotrader,dc=com" % (modifier)
        l.simple_bind_s( dn, modifier_passwd)
        dn="uid=%s,ou=People,dc=autotrader,dc=com" % (user_to_be_modified)

        mod_attrs = [ (ldap.MOD_REPLACE, attr, value)]
        execute_results = l.modify_s(dn, mod_attrs)
        result_type, result_data = l.result(execute_results, 0)

        l.unbind_s()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20111121/6115a31b/attachment.html>


More information about the python-ldap mailing list