Hugo González Monteverde
hugonz-lists at h-lab.net
Tue Nov 22 22:04:07 CET 2005
Looks like they are just constants. There is really no point in printing
or making any sense of their content, just use them as they are defined
in the module. This is like a C #define
But this is all LDAP specific... let's see:
> ## The next lines will also need to be changed to support your search
> requirements and directory
> baseDN = "ou=Customers, ou=Sales, o=anydomain.com"
> searchScope = ldap.SCOPE_SUBTREE
SCOPE_SUBTREE is one of the avaliable search scopes. According to
this(http://linuxjournal.com/article/6988) it should search for the
object and its descendants..
> if result_type == ldap.RES_SEARCH_ENTRY:
Reading it as it is, looks like the result may be something different,
but only those results that are of type RES_SEARCH_ENTRY are meaningful.
That's why you check it.
read, read, read. This is what I understand, not knowing crap about
LDAP, and just using Google.
Check the following docs:
Bingo! This is the LDAP application programming interface from which the
Python LDAP implementation has been 'stolen' All these definitions are
explained. For instance:
ld The connection handle;
base The dn of the entry at which to start the search;
scope One of LDAP_SCOPE_BASE, LDAP_SCOPE_ONELEVEL, or
LDAP_SCOPE_SUBTREE, indicating the scope of the search;
Upon successful completion, ldap_result() returns the type of the
result returned in the res parameter. This will be one of the
Google is your friend, and going through you may find most of your
Hope that help,
More information about the Tutor