From: <mi...@st...> - 2005-06-03 09:37:04
|
Fabio Marcone wrote: > I need to backup an ldap directory from python. I try to follow example in > docs about LDIFWriter but I have this problem: I want to have the ldif output > in a file, not in standard output, and so: how can I do? what paramenter I > have to pass to LDIFWriter in place of sys.stdout ? Simply pass a file object as argument: f = open('/tmp/dirbackup.ldif','wb') ldif_writer=ldif.LDIFWriter(f) Ciao, Michael. |