From: Lukas M. <lu...@ms...> - 2003-12-04 13:45:23
|
Hello, I want to show the whole tree with a for loop or anything else. I think it could work as follow: hasLeaveEntry() is a funktion that returns 0 or 1 if a subentry is there. for name, attrs in l.search_s(dn, ldap.SCOPE_ONELEVEL, "objectclass=*", []): x = hasLeaveEntry(name) if x == 1: for name, attrs in l.search_s(dn, ldap.SCOPE_ONELEVEL, "objectclass=*", []): x = hasLeaveEntry(name) and so on... else: continue But I want to write one, or two loops, which can show me every entry. For Example: Show first entry in base dc=x, if it has a leaveentry, show first entry in base dc=xx,dc=x and so on, or if not, show second entry in base dc=x, and again the same as above. However I can't get any loop working which is doing that as I described. Does anyone know a better technic oder anything else who might help me? Best regards Lukas |