Mark R Bannister wrote:
So what I'm asking is, what is the best way of achieving the following
workflow:
- start LDAP search
- start loop
- select() on FD, wake me up when there is data to read
- ldap.result() gives me ALL available data, and without waiting for
anything new
The ldap_result() manpage already tells you how things work. In fact,
so does the python-ldap documentation. Your loop structure is wrong.
- Attend to other unrelated events
- Go round loop again
You should be coding, instead:
- start LDAP search
- start loop
- select() on FD, wake me up when there is data to read
loop2:
- call ldap.result() with 0 timeout in a loop until it returns 0.
- Attend to other unrelated events
- Go round loop again