Zhang Huangbin wrote:
> 
> On Sep 9, 2009, at 9:48 PM, Michael Ströder wrote:
> 
>> BTW: That's why
>> ldap.modlist.modifyModlist() was implemented.
> 
> Any example?
> 
> There is no example in official python-ldap document:
> http://www.python-ldap.org/doc/html/ldap-modlist.html?highlight=modifymodlist#ldap.modlist.modifyModlist

>>> import ldap.modlist
>>> ldap.modlist.modifyModlist({'cn':'Mike'},{'cn':'Michael
Stroeder','mail':'mich...@stroeder.com'})
[(0, 'mail', 'mich...@stroeder.com'), (1, 'cn', None), (0, 'cn', 'Michael
Stroeder')]

So basically you read the old_entry dict with an search operation, derive a
new_entry dict from it, tweak that and pass old_entry and new_entry to this
function.

Ciao, Michael.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev

Reply via email to