Python LDAP / LDIF

Michael Ströder michael at
Tue Mar 20 00:39:46 CET 2001

Greg Wilson wrote:
> The "" file included with your distribution seems
> to translate LDIF to and from Python dicts;

You're on the right track: / l.result or l.search_s() returns a list of tuples of DN
and Python dict which you can convert into LDIF with

> does the main
> library contain a function or functions that I could use
> to push and pull LDIF with the server?

Pulling/pushing directly LDIF wouldn't make much sense since the
LDAP servers are already shipped with tools which do exactly this.

But feel free to dig into to see how I'm
doing it.
(Module w2lsearch, w2ladd - not very pretty code though.)

Ciao, Michael.

More information about the python-ldap mailing list