Feature Requests item #707547 (ldap_count_entries)

Michael Ströder michael at stroeder.com
Sun Mar 23 20:57:55 CET 2003


Michael Ströder wrote:
> 
>  From the examples I saw OpenLDAP's ldap_count_entries() is typically 
> used right before ldap_first_entry(). Is that right? Does 
> ldap_count_entries() consume anything from the results returned?
> 
> Unfortunately the call of ldap_first_entry() in python-ldap is hidden in 
> LDAPmessage_to_python() (see Modules/message.c) which in turn is called 
> by the already overloaded l_ldap_result() (see Modules/LDAPObject.c). 
> Changing anything here would result in a incompatible API change.

To rephrase my answer: Unfortunately ldap_count_entries() has to be called 
*after* ldap_result() and *before* ldap_first_entry().

> Now if ldap_count_entries() does not consume anything from the results 
> returned we could try to implement a solution for the following 
> (fictious) Python code using async search:

Forget about that.

Ciao, Michael.



More information about the python-ldap mailing list