async.LDIFWriter
Michael Ströder
michael at stroeder.com
Tue May 27 10:33:51 CEST 2003
Andrew Thomson wrote:
> any tips today? ;)
Let's see... ;-)
> ---
> import ldif
>
> f = open('data.ldiff','r')
>
> records = ldif.LDIFRecordList(f)
> data = records.parse()
> ---
This parses the whole input file and stores the data into a list in memory
which might not be suitable for very large LDIF files.
For stream-processing large LDIF files you simply have to sub-class
ldif.LDIFParser and implement the method handle(self,dn,entry).
Ciao, Michael.
More information about the python-ldap
mailing list