|
From: Michael <mi...@st...> - 2002-01-25 12:08:25
|
Thomas Heller wrote: > > I had mixed windows binaries > with current CVS code. The Win32 binaries are probably build against old Umich libs. There is no recent version of python-ldap linked against OpenLDAP 2 libs for native Win32 (only cygwin). python-ldap based on Umich libs does not provide support for SSL or StartTLS. > BTW: What I'm trying to do is to write a Python script which > imports a csv file (exported from a database we have here with > contact information: name, address, email, telphone number...) > into a LDAP server. Is there any previous work which could help > me getting started? IMHO there's a csv module for Python. You should map the table columns to attributes and build an entry dictionary. You can either write this to the LDAP server by converting the entry's dict with ldap.modlist.addModlist() to a modify list you can directly pass to add_s() method or diff against existing entries with ldap.modlist.modifyModlist(). Hmm, module ldap.modlist is only available in recent CVS version. You can extract it from there and back-port it to old version though. It does not directly rely on something else except some constants. You can also create LDIF with module ldif for bulk-upload into your LDAP server with some command-line tools. Recent version of module ldif in CVS is also improved. Ciao, Michael. |