On Sat, 2006-11-18 at 12:46 -0600, TomLy wrote:
I am working on the db dumper/ ldap importer and I can't seem to figure a couple of things out with the python ldif libraries.
I am working on getting the info out to an LDIF file. I think this is accomplished by putting the data into a dictionary (line 200) and making a call to LDIFWriter (line 204). I was hoping that all I had to do was pass the dictionary to the unparse function, but that's not working right.
When I call the unparse function I get output like the following:
dn: dc=fedoraproject,dc=org cn=Tom Lynema telephoneNumber: N telephoneNumber: o telephoneNumber: n telephoneNumber: e
It's always one character per line for some reason.
I haven't looked at the code - but the above is a good sign you're iterating over a string object not a list object.
try this and you'll see:
foo='lalalalal' for item in foo: print item
do a type() on the object you're getting the output from above and I bet it's as string not a list.
-sv