1.1.5 LDAP Objects

LDAP objects are returned by open() when a successful connection to an LDAP server is established. The connection is automatically unbound and closed when the LDAP object is deleted.

Most methods on LDAP objects initiate an asynchronous request to the LDAP server and return a message id that can be used later to retrieve the result with result(). Methods with names ending in `_s' are the synchronous form and wait for and return with the server's result, or with None if no data is expected. See below for a description of the result() method which describes the data structure returned from the server.

LDAP objects, have the following methods:

fileno()
Return the file descriptor associated with the connection, for use with the select module. (This method is available only if the underlying library can supply it.)


Subsections