On Tue, 29 Feb 2000, Michael Ströder raved thusly:
> David Leonard wrote:
> >
> > l = _ldap.open(...)
> > id = l.search(...blah..blah..)
> > for num in range(10):
> > res = l.result(id, 0)
> > print "Got one result", `res`
>
> Does this always return exactly one result? Or might there be more
> than one entries in the result res?
Yes, that's what the 0 ('all') argument is for.
Print its docstring.
"\tThe all parameter only has meaning for search() responses\n"
"\tand is used to select whether a single entry of the search\n"
"\tresponse should be returned, or to wait for all the results\n"
"\tof the search before returning.\n"
by the way your last sentence has an interesting parse:
> Or might there be ( more than one ) entries in the result res?
d
--
David Leonard Dav...@cs...
Dept of Comp. Sci. and Elec. Engg _ Room:78-624 Ph:+61 7 336 52447
The University of Queensland |+| http://www.csee.uq.edu.au/~leonard/
QLD 4072 AUSTRALIA ~` '~ E2A24DC6446E5779D7AFC41AA04E6401
Computers save man a lot of guesswork, but so does the bikini - BrightSun
|