[python-ldap] Fwd: Pagination in python-ldap 2.4

John Theodore JohnTheodore42 at gmail.com
Mon Dec 28 21:58:29 EST 2015


I found some examples online, but they all seem to be for python-ldap 2.3,
and the code they used is deprecated.

Can someone give me a simple example of querying for results beyond the
size limit?

This is the search I want to do: results =
ldap_obj.search_s('ou=people,blahblah,dc=com', ldap.SCOPE_SUBTREE,
filterstr='(id=*)', attrlist='mail')

Though there are 18k results, but the size limit is 10k. How can I use
python-ldap with paged results to get all the results?

I looked at the docs a bit and found
ldap.controls.libldap.SimplePagedResultsControl, though I'm confused on how
to use this properly.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20151228/f6fc01c2/attachment.html>


More information about the python-ldap mailing list