example of python-ldap module

David Margrave davidma at eskimo.com
Fri Oct 18 23:45:23 CEST 2002



something like:

results = l.search_s('o=search_base',ldap.SCOPE_SUBTREE,'uid=user')

the module actually has on-line docs as I recall.  Lok at
l.search_s.__doc__ for example.

Dave



On Fri, 18 Oct 2002, Jun Ding wrote:

> Could some body give me a short python exmple of how to use this module? I
> can't find any doc for how to use it, all docs I can find is C example. I
> installed a Windows 2k active direction ldap server on 10.20.30.100, and I
> can do that:
> >>> import ldap
> >>> l = ldap.open("10.20.30.100")
> >>> l.simple_bind("test","test")
> 1
> >>>
> Then what? like how can I get the value of "test" user's Last name? or how
> can I set some values back to my ldap server? Thanks.
>
>
> 


More information about the python-ldap mailing list