This simple function shows how to delete an object from eDirectory using Python and python-ldap. The object to delete is identified by the full distinguished name. Parameters: handle - A connection handle as returned by __connect. dn - String representation of the dn of the object to delete.
import ldap
def __delete( handle, dn ):
if not handle:
return False
handle.delete_s( dn )
© 2008 Novell, Inc. All Rights Reserved.