You can subscribe to this list here.
2000 |
Jan
|
Feb
(34) |
Mar
(9) |
Apr
|
May
(2) |
Jun
(14) |
Jul
(67) |
Aug
(34) |
Sep
(5) |
Oct
(20) |
Nov
(22) |
Dec
(31) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(15) |
Feb
(16) |
Mar
(20) |
Apr
(13) |
May
(72) |
Jun
(42) |
Jul
(41) |
Aug
(11) |
Sep
(19) |
Oct
(67) |
Nov
(59) |
Dec
(57) |
2002 |
Jan
(74) |
Feb
(69) |
Mar
(34) |
Apr
(55) |
May
(47) |
Jun
(74) |
Jul
(116) |
Aug
(68) |
Sep
(25) |
Oct
(42) |
Nov
(28) |
Dec
(52) |
2003 |
Jan
(19) |
Feb
(18) |
Mar
(35) |
Apr
(49) |
May
(73) |
Jun
(39) |
Jul
(26) |
Aug
(59) |
Sep
(33) |
Oct
(56) |
Nov
(69) |
Dec
(137) |
2004 |
Jan
(276) |
Feb
(15) |
Mar
(18) |
Apr
(27) |
May
(25) |
Jun
(7) |
Jul
(13) |
Aug
(2) |
Sep
(2) |
Oct
(10) |
Nov
(27) |
Dec
(28) |
2005 |
Jan
(22) |
Feb
(25) |
Mar
(41) |
Apr
(17) |
May
(36) |
Jun
(13) |
Jul
(22) |
Aug
(12) |
Sep
(23) |
Oct
(6) |
Nov
(4) |
Dec
|
2006 |
Jan
(11) |
Feb
(3) |
Mar
(5) |
Apr
(22) |
May
(1) |
Jun
(10) |
Jul
(19) |
Aug
(7) |
Sep
(25) |
Oct
(23) |
Nov
(5) |
Dec
(27) |
2007 |
Jan
(25) |
Feb
(17) |
Mar
(44) |
Apr
(8) |
May
(33) |
Jun
(31) |
Jul
(42) |
Aug
(16) |
Sep
(12) |
Oct
(16) |
Nov
(23) |
Dec
(73) |
2008 |
Jan
(26) |
Feb
(6) |
Mar
(46) |
Apr
(17) |
May
(1) |
Jun
(44) |
Jul
(9) |
Aug
(34) |
Sep
(20) |
Oct
(2) |
Nov
(4) |
Dec
(16) |
2009 |
Jan
(14) |
Feb
(3) |
Mar
(45) |
Apr
(52) |
May
(34) |
Jun
(32) |
Jul
(24) |
Aug
(52) |
Sep
(22) |
Oct
(23) |
Nov
(19) |
Dec
(10) |
2010 |
Jan
(10) |
Feb
(13) |
Mar
(22) |
Apr
(9) |
May
(1) |
Jun
(1) |
Jul
(8) |
Aug
(9) |
Sep
(10) |
Oct
(1) |
Nov
(2) |
Dec
(3) |
2011 |
Jan
|
Feb
(18) |
Mar
(39) |
Apr
(5) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <mi...@st...> - 2003-08-04 14:46:52
|
Andrew Thomson wrote: > i've currently been using py-ldap with openldap 2.0.27 with great > success. > > i was curious if it also works with the newer versions of openldap?? I'm using it with 2.1.22. > i'm also just using the freebsd ports to install these apps and the > current port kind of locks in the older version.. No clue about FreeBSD ports. Use the force and compile the source... > there is a openldap21 port You should be able to use that. Ciao, Michael. |
From: Andrew T. <ajt...@op...> - 2003-08-04 13:21:16
|
i've currently been using py-ldap with openldap 2.0.27 with great success. i was curious if it also works with the newer versions of openldap?? i'm also just using the freebsd ports to install these apps and the current port kind of locks in the older version.. ajt@oblivion:/usr/ports/net/py-ldap2 > pwd /usr/ports/net/py-ldap2 ajt@oblivion:/usr/ports/net/py-ldap2 > grep ldap2 Makefile # $FreeBSD: ports/net/py-ldap2/Makefile,v 1.21 2003/02/24 02:56:35 edwin Exp $ PORTNAME= ldap2 LIB_DEPENDS= ldap.2:${PORTSDIR}/net/openldap20 there is a openldap21 port so I was thinking about just changing the LIB_DEPENDS.. status? thanks, ajt. |
From: <mi...@st...> - 2003-07-31 07:50:18
|
Thieu-Hon Tran wrote: > > I just wanted to tell you about a newer (non-ancient) version of a > binary for python-ldap win32 (pre11). It's available here: > http://www.zope.org/Members/volkerw/LdapWin32 Good news! Thanks for letting us know. > This link should be included in the FAQs, updating the question > regarding a win32-version of python-ldap. Updated web pages. Ciao, Michael. |
From: Thieu-Hon T. <Thi...@we...> - 2003-07-31 07:26:19
|
[I'm not subscribed this list. Replies should go to my mail-adress, if you want to reach me.] Hi, I just wanted to tell you about a newer (non-ancient) version of a binary for python-ldap win32 (pre11). It's available here: http://www.zope.org/Members/volkerw/LdapWin32 This link should be included in the FAQs, updating the question regarding a win32-version of python-ldap. Best regards, Thieu-Hon Tran -- * WESTFLEISCH eG * IT Department * * Brockhoffstr. 11 * D-48143 Muenster, Germany * * Phone / Fax: +49 251 493-291 / -311 * |
From: <mi...@st...> - 2003-07-18 13:11:01
|
Marc KRAUTH wrote: > I would like to save data from a ldap to a ldif file and I would like to load > data (a restore for instance) from a ldif file to the ldap. > > I've done many tests, but nothing is working. I really nead some help and if > possible simple examples. http://python-ldap.sourceforge.net/doc/python-ldap/ldif-example.html http://python-ldap.sourceforge.net/doc/python-ldap/ldap.async-example.LDIFWriter.html Ciao, Michael. |
From: Marc K. <mar...@ac...> - 2003-07-18 13:03:10
|
I would like to save data from a ldap to a ldif file and I would like to load data (a restore for instance) from a ldif file to the ldap. I've done many tests, but nothing is working. I really nead some help and if possible simple examples. Marc KRAUTH. |
From: <mi...@st...> - 2003-07-15 17:53:21
|
ryan wrote: > the "LDAP Programming in Python" link on > python-ldap.sourceforge.net/docs.shtml is and always will be a broken link > now that that host is no longer with us. It's permenant home is > http://linuxjournal.com/article.php?sid=6988&mode=thread&order=0 Fixed. Thanks for letting us know. Ciao, Michael. |
From: ryan <tox...@sb...> - 2003-07-15 17:42:23
|
the "LDAP Programming in Python" link on python-ldap.sourceforge.net/docs.shtml is and always will be a broken link now that that host is no longer with us. It's permenant home is http://linuxjournal.com/article.php?sid=6988&mode=thread&order=0 |
From: Jean J. <je...@up...> - 2003-07-02 07:19:11
|
jean@blommie python-ldap $ diff -u Doc/ldap.tex~ Doc/ldap.tex --- Doc/ldap.tex~ 2003-06-11 12:40:59.000000000 +0200 +++ Doc/ldap.tex 2003-07-02 09:16:42.000000000 +0200 @@ -643,7 +643,7 @@ The asynchronous method \method{modify()} returns the message ID of the initiated request. -You might want to like into sub-module \refmodule{ldap.modlist} for +You might want to look into sub-module \refmodule{ldap.modlist} for generating \var{modlist}. \end{methoddesc} -- Jean Jordaan http://www.upfrontsystems.co.za |
From: <mi...@st...> - 2003-07-01 09:29:57
|
HI! Anyone who wants to talk to me in person about python-ldap programming or web2ldap is invited to come to the Crypto projects booth at Linuxtag 2003 in Karlsruhe, Germany from 2003-07-10 until 2003-07-13. http://www.linuxtag.de See you there! Ciao, Michael. |
From: Andrew T. <ajt...@op...> - 2003-06-30 06:48:29
|
no worries anymore.. got it sorted.. ajt. On Mon, Jun 30, 2003 at 03:24:37PM +1000, Andrew Thomson wrote: > i'm unsure of my incorrect usage here... > > mod_data = ldap.modlist.modifyModlist({'objectClass': 'oldclass'},{'objectClass': 'newclass'}) > print mod_data > > any tips appreciated. > > thanks, > > ajt. > > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 > _______________________________________________ > Python-LDAP-dev mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/python-ldap-dev > |
From: Andrew T. <ajt...@op...> - 2003-06-30 05:24:50
|
i'm unsure of my incorrect usage here... mod_data = ldap.modlist.modifyModlist({'objectClass': 'oldclass'},{'objectClass': 'newclass'}) print mod_data any tips appreciated. thanks, ajt. |
From: <mi...@st...> - 2003-06-25 10:40:51
|
Ed . wrote: > I used to be a C wizard, will check it out later on in my test > environment. I'd very much appreciate that since I'm the opposite of a C wizard. > This is much simpler but in mine I wanted to test the > effect of requesting all all versus single attributes and to do random > lookups. This is good however for initial high level investigations. Note that with my test script you can specify any search by LDAP URL which includes specifying certain attributes to read (see RFC2255). python perf_test.py "ldap://localhost:1390/dc=stroeder,dc=de?cn?sub" only retrieves attribute 'cn' of all search results. It also supports the bindname and X-BINDPW LDAP URL extensions: python perf_test.py "ldap://localhost:1390/dc=stroeder,dc=de?cn?sub?(objectClass=person)?bindname=cn=manager,X-BINDPW=secret" binds with cn=manager and password 'secret'. Ciao, Michael. |
From: Ed . <ep...@ho...> - 2003-06-25 09:30:59
|
I used to be a C wizard, will check it out later on in my test environment. This is much simpler but in mine I wanted to test the effect of requesting all all versus single attributes and to do random lookups. This is good however for initial high level investigations. Ed > >Ed, > >I wrote my own test script (attached). It's less complex to read but more >flexible (through LDAP URL as parameter). Please review. > >Usage: pref_test.py <LDAP URL> <number of tests> > >Grab whole sub-tree 100 times (no server-side limit or logging, ~500 >entries): > >$ python perf_test.py "ldap://localhost:1390/dc=stroeder,dc=de?*?sub" 100 >Opening connection each time: 20.4206629992 >Reusing connection: 16.9708769321 >Using ldapsearch: 6.0001270771 > >I'd appreciate if anyone with C knowledge could review what is done in >ldap_result() (LDAPObject.c) and LDAPmessage_to_python() (message.c). > >Ciao, Michael. > _________________________________________________________________ Stay in touch with absent friends - get MSN Messenger http://www.msn.co.uk/messenger |
From: <mi...@st...> - 2003-06-24 14:41:23
|
Ed, I wrote my own test script (attached). It's less complex to read but more flexible (through LDAP URL as parameter). Please review. Usage: pref_test.py <LDAP URL> <number of tests> Grab whole sub-tree 100 times (no server-side limit or logging, ~500 entries): $ python perf_test.py "ldap://localhost:1390/dc=stroeder,dc=de?*?sub" 100 Opening connection each time: 20.4206629992 Reusing connection: 16.9708769321 Using ldapsearch: 6.0001270771 I'd appreciate if anyone with C knowledge could review what is done in ldap_result() (LDAPObject.c) and LDAPmessage_to_python() (message.c). Ciao, Michael. --------------------------------- snip --------------------------------- #!/usr/bin/python import sys,os,time,ldap from ldap.ldapobject import LDAPObject from ldapurl import LDAPUrl try: ldap_url = LDAPUrl(sys.argv[1]) num_tests = int(sys.argv[2]) except IndexError: print 'Usage: pref_test.py <LDAP URL> <number of tests>' sys.exit(1) iter = num_tests start_time = time.time() while iter: l = LDAPObject(ldap_url.initializeUrl(),trace_level=0) l.protocol_version = 3 l.simple_bind_s(ldap_url.who or '',ldap_url.cred or '') l.search_s( ldap_url.dn, ldap_url.scope or ldap.SCOPE_BASE, ldap_url.filterstr or '(objectClass=*)', ldap_url.attrs or ['*'] ) l.unbind_s() del l iter -= 1 end_time = time.time() print 'Opening connection each time:',end_time-start_time iter = num_tests start_time = time.time() l = LDAPObject(ldap_url.initializeUrl(),trace_level=0) l.protocol_version = 3 l.simple_bind_s(ldap_url.who or '',ldap_url.cred or '') while iter: l.search_s( ldap_url.dn, ldap_url.scope or ldap.SCOPE_BASE, ldap_url.filterstr or '(objectClass=*)', ldap_url.attrs or ['*'] ) iter -= 1 end_time = time.time() l.unbind_s() del l print 'Reusing connection:',end_time-start_time iter = num_tests start_time = time.time() while iter: os.system('ldapsearch -x -H "%s" -b "%s" -s %s "%s" %s > /dev/null' % ( ldap_url.initializeUrl(), ldap_url.dn, {0:'base',1:'one',2:'sub'}[ldap_url.scope or ldap.SCOPE_BASE], ldap_url.filterstr or '(objectClass=*)', ' '.join(ldap_url.attrs or []) )) iter -= 1 end_time = time.time() print 'Using ldapsearch:',end_time-start_time |
From: <mi...@st...> - 2003-06-24 11:17:29
|
Gerhard Schmidt wrote: > > Ist there a way to set ldap controls from python. Unfortunately no (see TODO). Contributions welcome. Ciao, Michael. |
From: Gerhard S. <es...@au...> - 2003-06-24 11:00:41
|
hi There,=20 im working on an Python script to bulksetup some users in an e-Directory=20 server.=20 The Problem is that i have to set an ldap control to enable simple=20 passwords. Without this control e-Dirctory/nds stores the password in=20 some unreachable attributes.=20 Ist there a way to set ldap controls from python.=20 Bye Estartu ---------------------------------------------------------------------------- Gerhard Schmidt | Nick : estartu IRC : Estartu | PGP Public Key Fischbachweg 3 | Privat: es...@au... | auf Anfrage/ 86856 Hiltenfingen | Dienst: sc...@ze... | on request |
From: <mi...@st...> - 2003-06-24 07:52:57
|
Ed, Cc:-ed list since this might be of general interest. Ed . wrote: > > I'm pleased to hear that there are optimisations which can be made, not > sure I understand the reference to __debug__. http://www.python.org/doc/current/ref/assert.html#l2h-310 > Perhaps it's a > documentation problem and that logging should be off by default and > enabled for those doing debugging? Logging is off by default (trace_level=0). But the if-statements checking trace_level are executed if the Python interpreter was invoked without -O. If running with -O it is my understanding that code behind if __debug__ is completely optimized away and never executed. Therefore tracing is only available when running without -O. Ciao, Michael. |
From: <mi...@st...> - 2003-06-23 17:56:46
|
Andrei Tsaregorodtsev wrote: > > ImportError: /usr/lib/python2.2/site-packages/_ldap.so: undefined > symbol: ldap_first_reference Most times this happens if there's a OpenLDAP library mix on your system. How does your setup.cfg look like? Is /usr/lib/libldap_r.so.2 really the OpenLDAP lib you compiled with? Ciao, Michael. |
From: Andrei T. <at...@in...> - 2003-06-23 17:48:41
|
Hello, I have a problem using ldap-python package. When I just do import of the ldap module, I get: >>>import ldap Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.2/site-packages/ldap/__init__.py", line 21, in ? from _ldap import * ImportError: /usr/lib/python2.2/site-packages/_ldap.so: undefined symbol: ldap_first_reference I use python 2.2.2 and openldap libraries 2.0.27. _ldap.so has all the dependancies resolved: > ldd _ldap.s0 libldap_r.so.2 => /usr/lib/libldap_r.so.2 (0x40021000) liblber.so.2 => /usr/lib/liblber.so.2 (0x4004f000) libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0x4005a000) libssl.so.4 => /lib/libssl.so.4 (0x4006d000) libcrypto.so.4 => /lib/libcrypto.so.4 (0x400a3000) libc.so.6 => /lib/tls/libc.so.6 (0x42000000) libsasl.so.7 => /usr/lib/libsasl.so.7 (0x40194000) libdl.so.2 => /lib/libdl.so.2 (0x4019f000) libresolv.so.2 => /lib/libresolv.so.2 (0x401a2000) libcrypt.so.1 => /lib/libcrypt.so.1 (0x401b4000) libgssapi_krb5.so.2 => /usr/kerberos/lib/libgssapi_krb5.so.2 (0x401e1000) libkrb5.so.3 => /usr/kerberos/lib/libkrb5.so.3 (0x401f5000) libk5crypto.so.3 => /usr/kerberos/lib/libk5crypto.so.3 (0x40253000) libcom_err.so.3 => /usr/kerberos/lib/libcom_err.so.3 (0x40263000) libz.so.1 => /usr/lib/libz.so.1 (0x40265000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000) libgdbm.so.2 => /usr/lib/libgdbm.so.2 (0x40273000) libpam.so.0 => /lib/libpam.so.0 (0x4027a000) Can you please give me a hint what's going wrong ? Thank you, Andrei Tsaregorodtsev -- Centre de Physique des Particules de Marseille 163 avenue de Luminy, case 907 13288 Marseille cedex 09 tel.: +33 491827623 fax: +33 491827299 |
From: <mi...@st...> - 2003-06-23 12:52:36
|
Ed . wrote: > Attached is the script I used to compare python-ldap with ldapsearch. Not sure whether everything's ok with your script. On my LDAP server the following appears in the log: Jun 23 14:47:03 nb2 slapd[10223]: conn=67 op=9999 SEARCH RESULT tag=101 err=0 nentries=0 text= Jun 23 14:47:03 nb2 slapd[10218]: conn=67 op=10000 SRCH base="dc=stroeder,dc=de" scope=2 filter="(?=undefined)" The temporary file only contains the name, no attribute type for the search filter. Anyway, if you run it with python -O you will see a big performance gain since all the trace logging stuff in LDAPObject._ldap_call() is completely deactivated (enclose in if __debug__). Ciao, Michael. |
From: Ed . <ep...@ho...> - 2003-06-23 12:13:57
|
Attached is the script I used to compare python-ldap with ldapsearch. Script ran on same machine as the ldap server. The two envirnments teste used fairly recent openldaps and in one case had python-ldap 2.0.0(pre6), the other was more recent. Ratio of python-ldap:ldapsearch seemed constant regardless of version. Ed #!/home/zope/bin/python from os import system, remove from posix import getpid, close from random import random import time import ldap, string search='(cn=*)' host='localhost' port=389 uname="" pw="" # set your directory base here base = "dc=da,dc=mod,dc=uk" iter = 1000 raw = [] def timeit(fn): start = time.time() fn() return time.time() - start # Search whole directory, returning all attributes, python and command line versions def dump_all_py(): global base, search, raw raw = l.search_s(base, ldap.SCOPE_SUBTREE, search) def dump_all_sh(): cmd = 'ldapsearch -h %s -p %i -b "%s" -s sub -x -D "%s" -w "%s" \'%s\' >/dev/null' % \ (host, port, base, uname, pw, search) system(cmd) #print cmd # Search whole directory, returning cn, python and command line versions def dump_cn_py(): global base, search, raw raw = l.search_s(base, ldap.SCOPE_SUBTREE, search, ['cn']) def dump_cn_sh(): cmd = 'ldapsearch -h %s -p %i -b "%s" -s sub -x -D "%s" -w "%s" \'%s\' %s >/dev/null' % \ (host, port, base, uname, pw, search, 'cn') system(cmd) #print cmd # Python cn lookup, exact and initial substring versions def lk_exact_py(): global ents, base for cn in ents: search = '(cn=%s)' % (cn) entry = l.search_s(base, ldap.SCOPE_SUBTREE, search) def lk_sub_py(): global ents, base for cn in ents: search = '(cn=%s*)' % (cn) entry = l.search_s(base, ldap.SCOPE_SUBTREE, search) # Command line cn lookup, exact and initial substring versions # Prepare datafiles for use with command line lookups def prep_sh_data(): global ents, base, tmpf1, tmpf2 tmpf1 = '/tmp/ldap%d-1' % (getpid()) tmpf2 = '/tmp/ldap%d-2' % (getpid()) t1 = open(tmpf1, 'w') t2 = open(tmpf2, 'w') for cn in ents: print >>t1, cn print >>t2, cn+'*' t1.close() t2.close() cmdstring = 'ldapsearch -f %s -h %s -p %i -b "%s" -s sub -x -D "%s" -w "%s" %s>/dev/null' def lk_exact_sh(): global base, tmpf1 cmd = cmdstring % (tmpf1, host, port, base, uname, pw, "'(cn=%s)'") system(cmd) #print cmd def lk_sub_sh(): global base, tmpf2 cmd = cmdstring % (tmpf2, host, port, base, uname, pw, "'(cn=%s*)'") system(cmd) #print cmd l = ldap.initialize('ldap://%s:%s' % (host, port)) l.simple_bind_s(uname, pw) print 'Reading complete directory all attributes' elapsed = timeit(dump_all_py) ct = len(raw) print 'PY: %i entries in %5.2f secs, %5.2f entries/sec' % (ct, elapsed, ct/elapsed) elapsed = timeit(dump_all_sh) l = ldap.initialize('ldap://%s:%s' % (host, port)) l.simple_bind_s(uname, pw) print 'Reading complete directory all attributes' elapsed = timeit(dump_all_py) ct = len(raw) print 'PY: %i entries in %5.2f secs, %5.2f entries/sec' % (ct, elapsed, ct/elapsed) elapsed = timeit(dump_all_sh) print ' C: %i entries in %5.2f secs, %5.2f entries/sec' % (ct, elapsed, ct/elapsed) print '\nReading complete directory, single attribute' raw=[] elapsed = timeit(dump_cn_py) ct = len(raw) print 'PY: %i entries in %5.2f secs, %5.2f entries/sec' % (ct, elapsed, ct/elapsed) elapsed = timeit(dump_cn_sh) print ' C: %i entries in %5.2f secs, %5.2f entries/sec' % (ct, elapsed, ct/elapsed) # First build up a list of entries to lookup ents = [] i = 0 while i < iter: e = int(random()*ct) # N.B. sort this out! ents.append(raw[e][1]['cn'][0]) i += 1 print '\n%i lookups (exact match)' % (iter) elapsed = timeit(lk_exact_py) print 'PY: %5.2f secs, %5.2f entries/sec' % (elapsed, iter/elapsed) prep_sh_data() elapsed = timeit(lk_exact_sh) print ' C: %5.2f secs, %5.2f entries/sec' % (elapsed, iter/elapsed) print '\n%i lookups (substring)' % (iter) elapsed = timeit(lk_sub_py) print 'PY: %5.2f secs, %5.2f entries/sec' % (elapsed, iter/elapsed) elapsed = timeit(lk_sub_sh) print ' C: %5.2f secs, %5.2f entries/sec' % (elapsed, iter/elapsed) remove(tmpf1) remove(tmpf2) l.unbind_s() _________________________________________________________________ Stay in touch with absent friends - get MSN Messenger http://www.msn.co.uk/messenger |
From: Michael E. <men...@ka...> - 2003-06-20 19:42:38
|
Thanks this is just what I was looking for. Mike On Friday, June 20, 2003, at 11:10 AM, Michael Str=F6der wrote: > Michael Engelhart wrote: >> Does anyone have the correct python format pattern for creating=20 >> datetime strings from either mx.DateTime objects or date strings=20 >> ('10/10/2003') for OpenLDAP. > > I'd rather use time.strftime() since I don't know about mx.DateTime=20 > objects. > > Current time converted to GeneralizedTime string in Zulu time: > > import time > time.strftime('%Y%m%d%H%M%SZ',time.gmtime(time.time())) > > Ciao, Michael. > |
From: <mi...@st...> - 2003-06-20 18:46:35
|
Ryan, thanks for contributing docs. Sorry, for reviewing it so late. ryan wrote: > > I wrote an article on using python-ldap and i'm hoping an expert can look it > [..] > http://www.seekrut.com/rk/LDAP-Programming-in-Python.html 1. I'd like to note that there's no such thing like a user in LDAP. A bind-DN is normally used with a simple BindRequest which can be the DN of any entry in the directory. I'd prefer to see the terms 'who' and 'cred' being used instead of 'username' and 'password'. 2. Any reason why you start with showing use of async search() instead of the simpler approach for beginners with search_s()? 3. It might be worth to note that an attribute has to be present to retrieve e.g. name = entry[1]['cn'][0]. It will throw a KeyError if attribute 'cn' is not present in entry. Maybe you can add some simple error handling? 4. I'd like to see a more clearer note about exception being exception instances. Something like: except ldap.LDAPError, ldap_error: print str(ldap_error) Please go ahead writing more text. Would be very nice to see a python-ldap tutorial. Ciao, Michael. |
From: <mi...@st...> - 2003-06-20 15:11:56
|
Michael Engelhart wrote: > > Does anyone have the correct python format pattern for creating datetime > strings from either mx.DateTime objects or date strings ('10/10/2003') > for OpenLDAP. I'd rather use time.strftime() since I don't know about mx.DateTime objects. Current time converted to GeneralizedTime string in Zulu time: import time time.strftime('%Y%m%d%H%M%SZ',time.gmtime(time.time())) Ciao, Michael. |