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: <fra...@fr...> - 2005-09-09 08:19:46
|
Bjorn Ove Grotan wrote: >Don't know if there's one in pygtk, but there is one written using pyqt. > >Luma -> http://luma.sf.net > >Following plugins are available: >- Browser >- Search >- Addressbook >- Template >- Massive User Creation >- Admin Utilities >- Schema browser > > Hi Bjorn, yes I know Luma, that's a good browser. I just want to have one in pygtk :-) Regards, François |
From: Bjorn O. G. <bjo...@it...> - 2005-09-09 08:07:06
|
Fran=E7ois Beretti: > Hi, >=20 > Do you know if there is an LDAP browser written with python-ldap and=20 > pygtk ? I am (very slowly) writing one, and wanted to know if there wa= s=20 > another project. Don't know if there's one in pygtk, but there is one written using pyqt. Luma -> http://luma.sf.net Following plugins are available: - Browser - Search - Addressbook - Template - Massive User Creation - Admin Utilities - Schema browser --=20 Regards =20 Bj=F8rn Ove Gr=F8tan |
From: <fra...@fr...> - 2005-09-09 07:49:25
|
Hi, Do you know if there is an LDAP browser written with python-ldap and pygtk ? I am (very slowly) writing one, and wanted to know if there was another project. Thank you, François |
From: Richard M. <ric...@gm...> - 2005-09-08 22:32:12
|
Chetan Kothari wrote: >I would be modifying the schema in the Sun One Directory Server (version 5.2). We do this using the Netscape LDAP client APIs in C. However, we are considering using python for some portions of the application and need to modify the schema from python. > > Then you can use LDAP modify operations with add, using attribute types "attributeTypes" and "objectClasses" and the RFC 2252 syntax for the values. For reference, see the schema files supplied with the server, or just do an ldapsearch of cn=schema. >Thanks.... > >regards, >Chetan > >-----Original Message----- >From: Richard Megginson [mailto:ric...@gm...] >Sent: Thursday, September 08, 2005 3:10 PM >To: Chetan Kothari >Cc: pyt...@li... >Subject: Re: Sample python scripts to modify the schema in the Directory >Server > > >Chetan Kothari wrote: > > > >>>Hi, >>> >>>I have just started using the python-ldap module. I was wondering if there are any sample script or existing programs that would allow me to modify the schema (add objectclasses and attributes) to the schema in the Directory Server. >>>My application needs to extend the schema as some of the entries need to use attributes not defined in the standard schema. >>> >>>I am assuming that I can do this by using the "modify_s" routine. But is there any other module or program that does this? >>> >>> >>> >>> >Modifying schema over LDAP is very server dependent. What LDAP servers >would you be using? > > > >>>regards, >>>Chetan Kothari >>>Packeteer Inc. >>>Member of Technical Staff >>> >>> >>> >>> >>> >>------------------------------------------------------- >>SF.Net email is Sponsored by the Better Software Conference & EXPO >>September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices >>Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA >>Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf >>_______________________________________________ >>Python-LDAP-dev mailing list >>Pyt...@li... >>https://lists.sourceforge.net/lists/listinfo/python-ldap-dev >> >> >> >> >> >> > > > > |
From: Chetan K. <cko...@pa...> - 2005-09-08 22:13:24
|
I would be modifying the schema in the Sun One Directory Server (version = 5.2). We do this using the Netscape LDAP client APIs in C. However, we = are considering using python for some portions of the application and = need to modify the schema from python. Thanks.... regards, Chetan -----Original Message----- From: Richard Megginson [mailto:ric...@gm...] Sent: Thursday, September 08, 2005 3:10 PM To: Chetan Kothari Cc: pyt...@li... Subject: Re: Sample python scripts to modify the schema in the Directory Server Chetan Kothari wrote: >>Hi, >> >>I have just started using the python-ldap module. I was wondering if = there are any sample script or existing programs that would allow me to = modify the schema (add objectclasses and attributes) to the schema in = the Directory Server. >>My application needs to extend the schema as some of the entries need = to use attributes not defined in the standard schema. >> >>I am assuming that I can do this by using the "modify_s" routine. But = is there any other module or program that does this? >> =20 >> Modifying schema over LDAP is very server dependent. What LDAP servers=20 would you be using? >>regards, >>Chetan Kothari >>Packeteer Inc. >>Member of Technical Staff >> >> =20 >> > > >------------------------------------------------------- >SF.Net email is Sponsored by the Better Software Conference & EXPO >September 19-22, 2005 * San Francisco, CA * Development Lifecycle = Practices >Agile & Plan-Driven Development * Managing Projects & Teams * Testing & = QA >Security * Process Improvement & Measurement * = http://www.sqe.com/bsce5sf >_______________________________________________ >Python-LDAP-dev mailing list >Pyt...@li... >https://lists.sourceforge.net/lists/listinfo/python-ldap-dev > > > =20 > |
From: Richard M. <ric...@gm...> - 2005-09-08 22:10:02
|
Chetan Kothari wrote: >>Hi, >> >>I have just started using the python-ldap module. I was wondering if there are any sample script or existing programs that would allow me to modify the schema (add objectclasses and attributes) to the schema in the Directory Server. >>My application needs to extend the schema as some of the entries need to use attributes not defined in the standard schema. >> >>I am assuming that I can do this by using the "modify_s" routine. But is there any other module or program that does this? >> >> Modifying schema over LDAP is very server dependent. What LDAP servers would you be using? >>regards, >>Chetan Kothari >>Packeteer Inc. >>Member of Technical Staff >> >> >> > > >------------------------------------------------------- >SF.Net email is Sponsored by the Better Software Conference & EXPO >September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices >Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA >Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf >_______________________________________________ >Python-LDAP-dev mailing list >Pyt...@li... >https://lists.sourceforge.net/lists/listinfo/python-ldap-dev > > > > |
From: Eric G O. <eri...@gm...> - 2005-09-08 21:37:25
|
On 9/8/05, Chetan Kothari <cko...@pa...> wrote: >=20 > > Hi, > > > > I have just started using the python-ldap module. I was wondering if=20 > there are any sample script or existing programs that would allow me to= =20 > modify the schema (add objectclasses and attributes) to the schema in the= =20 > Directory Server. > > My application needs to extend the schema as some of the entries need t= o=20 > use attributes not defined in the standard schema. > > > > I am assuming that I can do this by using the "modify_s" routine. But i= s=20 > there any other module or program that does this? modify_s is a synchronous modify function. Not, as I think you see it,=20 "modify schema". > > > regards, > > Chetan Kothari > > Packeteer Inc. > > Member of Technical Staff > > >=20 >=20 > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle=20 > Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & Q= A > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > Python-LDAP-dev mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/python-ldap-dev > |
From: Chetan K. <cko...@pa...> - 2005-09-08 21:30:18
|
> Hi, >=20 > I have just started using the python-ldap module. I was wondering if = there are any sample script or existing programs that would allow me to = modify the schema (add objectclasses and attributes) to the schema in = the Directory Server. > My application needs to extend the schema as some of the entries need = to use attributes not defined in the standard schema. >=20 > I am assuming that I can do this by using the "modify_s" routine. But = is there any other module or program that does this? >=20 > regards, > Chetan Kothari > Packeteer Inc. > Member of Technical Staff >=20 |
From: Ingo S. <st...@un...> - 2005-09-08 13:49:30
|
Hi I believe there is an encoding-problem with ldap.explode_dn, if I give him = an=20 utf8-string with excaped umlauts I get an latin with broken escapes: >>> dn=3Du'uid=3Dl=F6l=F6,cn=3Dbl=F6' >>> dn u'uid=3Dl\xf6l\xf6,cn=3Dbl\xf6' >>> ldap.explode_dn(dn) Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.3/site-packages/ldap/functions.py", line 117, in=20 explode_dn return _ldap_function_call(_ldap.explode_dn,dn,notypes) File "/usr/lib/python2.3/site-packages/ldap/functions.py", line 57, in=20 _ldap_function_call result =3D func(*args,**kwargs) UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' in positio= n=20 5: ordinal not in range(128) >>> ldap.explode_dn(dn.encode('utf8')) ['uid=3Dl\\C3\\B6l\\C3\\B6', 'cn=3Dbl\\C3\\B6'] >>> ldap.explode_dn(dn.encode('utf8'))[0].decode('utf8') u'uid=3Dl\\C3\\B6l\\C3\\B6' >>> dn.encode('utf8').decode('utf8') u'uid=3Dl\xf6l\xf6,cn=3Dbl\xf6 Is this by design, by mistake or a bug in the OpenLdap-Libs? Regards Ingo Steuwer =2D-=20 Ingo Steuwer st...@un... fon: +49 421 22 232- 0 Entwicklung Linux for Your Business Univention GmbH http://www.univention.de/ fax: +49 421 22 232-99 |
From: Michal K. <mk...@po...> - 2005-08-31 19:31:59
|
Daniel Nunes Lucianete - DTI [dan...@em...] wrote: > Hi all, > > I'm looking for python-ldap for Solaris 9,source or binary. I > didn't find it. Could you show me the way? You have to compile it against some ldap sdk. Using openldap for that purpose seems to be easier then using Sun sdk for most people. Please note it doesn't mean you'd have to replace native solaris tools with those from openldap. I don't think any binary exists. Cheers, -- Michal Kurowski <mk...@po...> |
From: Michal K. <mk...@ga...> - 2005-08-31 19:19:08
|
Daniel Nunes Lucianete - DTI [dan...@em...] wrote: > > I'm looking for python-ldap for Solaris 9,source or binary. I > didn't find it. Could you show me the way? You have to compile it against some ldap sdk. Using openldap for that purpose seems to be easier then using Sun sdk for most people. Please note it doesn't mean you'd have to replace native solaris tools with those from openldap. I don't think any binary exists. Cheers, -- Michal Kurowski <mk...@ga...> |
From: Daniel N. L. - D. <dan...@em...> - 2005-08-31 17:58:06
|
Hi all, I'm looking for python-ldap for Solaris 9,source or binary. I didn't find it. Could you show me the way? Thanks in advance, Daniel Nunes Lucianete Dan...@em... EMBRAPA/DTI - Bras=EDlia-DF - F: (61) - 448.4448 Http://www.embrapa.br/ |
From: Daniel N. L. - D. <dan...@em...> - 2005-08-31 15:27:39
|
Hi all, I'm looking for python-ldap for Solaris 9, source or binary. I didn't find it. Could you show me the way? Thanks in advance, Daniel Nunes Lucianete Dan...@em... EMBRAPA/DTI - Bras=EDlia-DF - F: (61) - 448.4448 Http://www.embrapa.br/ |
From: <mi...@st...> - 2005-08-24 09:55:54
|
Eric G Ortego wrote: > I have been learning python and ldap lately and ran across the ldaputil > folder in web2ldap looking for password hashing python code. > My question is what is the latest version of the passwd.py util? Have > these password classes been tested & are they being used anywhere? They were developed for web2ldap. Generating the hashes work. Not sure whether the over-designed modify request code works though. Ciao, Michael. P.S.: Please don't e-mail me personally. I'd prefer to receive such support requests through python-ldap's mailing list (Cc:-ed). |
From: Thomas W. <Tho...@jp...> - 2005-08-10 03:51:47
|
Hi, I could use some help. I can't seem to get python-ldap to connect to an LDAP server (SVR) uinsg TLS (or SSL). I running Windows XP with Python 2.2.3 and Python-ldap for Windows (binary distribution). l = ldap.open(svr) l.start_tls_s() l.simple_bind_s(dn,pwd) I get the following error messages: Traceback (most recent call last): File "C:/Documents and Settings/tlwolfe/Desktop/Dir Code EXamples/2a.py", line 85, in ? status,errmsg = AuthenticateUser(server,userdn,password,debug) File "C:/Documents and Settings/tlwolfe/Desktop/Dir Code EXamples/2a.py", line 36, in AuthenticateUser l.start_tls_s() File "C:\Python22\lib\site-packages\ldap\ldapobject.py", line 444, in start_tls_s self._ldap_call(self._l.start_tls_s,*args,**kwargs) AttributeError: start_tls_s Can someone tell me what is going on? Is there a later version for windows that work? I appreciate the help. Tom Wolfe |
From: Brad A. <bra...@ma...> - 2005-08-06 15:14:57
|
Hi, I see that others on the list have successfully authenticated against Active Directory using python-ldap. http://sourceforge.net/mailarchive/forum.php?thread_id=7313275&forum_id=4346 What I'm now wondering about is whether it's possible to take an obtained set of Active Directory credentials (a Kerberos ticket? from a Python client app and pass those credentials across the network to a Python server app, which would inspect the credentials and provide appropriate authorizations. The client app must run on Mac OS X and Windows XP, while the server app runs on Windows XP and relies on Python's SimpleXMLRPC. I haven't yet gotten as far as building and installing python-ldap and the requisite components, but it would be nice to know before I get too far into it whether I'm barking up the wrong tree and should start looking at more specialized Active Directory/Kerberos tools. Any thoughts or help on this subject would be appreciated. Thanks! Brad Allen Omnicom Management Services Dallas, TX |
From: Jens V. <je...@da...> - 2005-08-02 07:42:53
|
On 1 Aug 2005, at 14:51, Wido Depping wrote: > Hello Python-LDAP users, > I'm in search of some tester for the new TLS/SSL and Certificate > features used in Luma. The old behavior when choosing TLS/SSL was > wrong and you weren't able to configure certificate stuff. Now you can > set checking of the server side certificate and you can configure the > client side certificates. Unfortunately I don't have a server at hand > to test all possible combinations. It would be cool if some of the > people from this list, who use these features on their server, could > download the latest snapshot of Luma and give me a feedback if it > works for their environment. > > The tarball is located at: > http://home.tu-clausthal.de/~ifwd/luma/luma-2.2pre6.tar.bz2 > Luma needs PyQt and Python-LDAP in order to run. I actually braved the monstrous PyQT/QT downloads to look at it, but it's not usable, at least on OS X. No matter what I do or how I click on it, the application stays mostly greyed out, as if something is in the foreground and the application is not active. jens |
From: Sean O'C. <oco...@so...> - 2005-08-01 16:04:53
|
Jacob Here is a little code snippet from a search in AD. I am using ldaps to talk to our AD DCs, hence the TLS options. #-----------------------------------------------------------------------------# # Make LDAP connection to AD # Tip from python-ldap list ldap.set_option(ldap.OPT_REFERRALS,0) # Another tip from python-ldap list ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT,ldap.OPT_X_TLS_NEVER) # Open the LDAPS connection to AD try: l = ldap.initialize(myAdLdapUri) except ldap.LDAPError,e: print e sys.exit(1) # Set protocol version to LDAPv3 l.protocol_version = ldap.VERSION3 # Bind to AD try: l.simple_bind(myAdBindDn,myAdPasswd) except ldap.LDAPError, e: print e sys.exit(1) On Wed, 2005-07-27 at 17:12 -0500, jacob martinson wrote: > I have a small script using python-ldap in python-2.3 and it takes > about 3.5 seconds to perform a simple bind to our server. I can > perform a complete search from the command line with ldapsearch in > about 0.02 sec. > > I've appended the code & timing output. Am I missing something here? > > Thanks! > > -Jacob > > > $ time ldapsearch -x -h host -D "cn=Jones\, Bob,cn=Users,dc=dom,dc=com" \ > > -w pass -b "cn=users,dc=dom,dc=com" "sAMAccountName=acct" mail > # extended LDIF > # > # LDAPv3 > <snip> > # search result > search: 2 > result: 0 Success > # numResponses: 2 > # numEntries: 1 > > real 0m0.024s > user 0m0.003s > sys 0m0.006s > > $ cat ldaptest.py > #!/usr/bin/python > > import ldap > import profile > import time > > from pprint import pprint > > def ldapsearch(): > passwd='adsf' > > t0 = time.time() > l = ldap.initialize("ldap://server:389") > t1 = time.time() > print 'ldap.initialize() ' + str(t1 - t0) > > t0 = time.time() > l.bind(who="cn=Jones\, > Bob,cn=Users,dc=dom,dc=com",cred=passwd,method=ldap.AUTH_SIMPLE) > t1 = time.time() > print 'l.bind() ' + str(t1 - t0) > > t0 = time.time() > msgid = > l.search(base="cn=users,dc=dom,dc=com",scope=ldap.SCOPE_SUBTREE,filterstr="sAMAccountName=acct",attrlist=['mail']) > t1 = time.time() > print 'l.search() ' + str(t1 - t0) > > t0 = time.time() > res = l.result(msgid) > t1 = time.time() > print 'l.result() ' + str(t1 - t0) > > > if __name__ == '__main__': > ldapsearch() > > which produces: > > $ time ./ldaptest.py > ldap.initialize() 0.00811719894409 > l.bind() 3.45404982567 > l.search() 0.00253987312317 > l.result() 0.00940012931824 > > real 0m3.557s > user 0m0.030s > sys 0m0.070s -- Sean |
From: Wido D. <wid...@gm...> - 2005-08-01 13:51:21
|
Hello Python-LDAP users, I'm in search of some tester for the new TLS/SSL and Certificate features used in Luma. The old behavior when choosing TLS/SSL was wrong and you weren't able to configure certificate stuff. Now you can set checking of the server side certificate and you can configure the client side certificates. Unfortunately I don't have a server at hand to test all possible combinations. It would be cool if some of the people from this list, who use these features on their server, could download the latest snapshot of Luma and give me a feedback if it works for their environment. The tarball is located at: http://home.tu-clausthal.de/~ifwd/luma/luma-2.2pre6.tar.bz2 Luma needs PyQt and Python-LDAP in order to run. mfg. Wido Depping --=20 Wido Depping ICQ: 51303067 AIM: wido3379 Jabber: wi...@ja... |
From: Wido D. <wid...@gm...> - 2005-08-01 13:40:18
|
On 7/28/05, jacob martinson <mar...@gm...> wrote: > I have a small script using python-ldap in python-2.3 and it takes > about 3.5 seconds to perform a simple bind to our server. I can > perform a complete search from the command line with ldapsearch in > about 0.02 sec. >=20 > I've appended the code & timing output. Am I missing something here? Your code seems to be okay, although I'm using simple_bind() instead of bind(). On a local server Luma needs about 0,006 sec for an authenticated bind and about 0,1s for a complete search, which includes creating a thread, updating the gui and packing the ldap results in a special object. For me the only difference are the functions used for the bind operation. I didn't have a look at the sourcecode, but maybe the others have an idea what's going wrong. mfg. Wido --=20 Wido Depping ICQ: 51303067 AIM: wido3379 Jabber: wi...@ja... |
From: <mi...@st...> - 2005-07-28 13:25:22
|
Find a new release of python-ldap: http://python-ldap.sourceforge.net/ python-ldap provides an object-oriented API to access LDAP directory servers from Python programs. It mainly wraps the OpenLDAP 2.x libs for that purpose. Additionally it contains modules for other LDAP-related stuff (e.g. processing LDIF, LDAPURLs and LDAPv3 schema). ---------------------------------------------------------------- Released 2.0.9 2005-07-28 Changes since 2.0.8: Modules/ * Removed __doc__ strings from ldapcontrol.c to "fix" build problems with Python versions 2.2 and earlier. |
From: shishkin.alexey <shi...@gm...> - 2005-07-28 12:30:44
|
Big thanks you all! I've checked up latest version of ldapcontrol.c from cvs and have successfully build python-ldap. =20 --=20 shishkin -----Original Message----- From: pyt...@li... [mailto:pyt...@li...] On Behalf Of = Michael Str=C3der Sent: Tuesday, July 26, 2005 6:04 PM To: pyt...@li... Subject: Re: build error on RHEL3 (ES) Michael Str=C3der wrote: > Ames Andreas wrote: >=20 >>static char encode_rfc2696__doc__[] =3D "encode_page_control(blabla)"; >=20 > Frankly I'd like to drop __doc__ strings in the C part completely. >=20 > It's much better to define __doc__ strings for the class methods, in > this case methods of class ldap.control.SimplePagedResultsControl. > That's where programmers and tools like pydoc expect them to be. I've checked in a new version of ldapcontrol.c without the __doc__ strings. I'd like to keep the C part under Modules/ as lean as possible. Please test. Ciao, Michael. |
From: jacob m. <mar...@gm...> - 2005-07-27 22:12:21
|
I have a small script using python-ldap in python-2.3 and it takes about 3.5 seconds to perform a simple bind to our server. I can perform a complete search from the command line with ldapsearch in about 0.02 sec. I've appended the code & timing output. Am I missing something here? Thanks! -Jacob $ time ldapsearch -x -h host -D "cn=3DJones\, Bob,cn=3DUsers,dc=3Ddom,dc=3D= com" \ > -w pass -b "cn=3Dusers,dc=3Ddom,dc=3Dcom" "sAMAccountName=3Dacct" mail # extended LDIF # # LDAPv3 <snip> # search result search: 2 result: 0 Success # numResponses: 2 # numEntries: 1 real 0m0.024s user 0m0.003s sys 0m0.006s $ cat ldaptest.py #!/usr/bin/python import ldap import profile import time from pprint import pprint def ldapsearch(): passwd=3D'adsf' t0 =3D time.time() l =3D ldap.initialize("ldap://server:389") t1 =3D time.time() print 'ldap.initialize() ' + str(t1 - t0) t0 =3D time.time() l.bind(who=3D"cn=3DJones\, Bob,cn=3DUsers,dc=3Ddom,dc=3Dcom",cred=3Dpasswd,method=3Dldap.AUTH_SIMPLE) t1 =3D time.time() print 'l.bind() ' + str(t1 - t0) t0 =3D time.time() msgid =3D l.search(base=3D"cn=3Dusers,dc=3Ddom,dc=3Dcom",scope=3Dldap.SCOPE_SUBTREE,f= ilterstr=3D"sAMAccountName=3Dacct",attrlist=3D['mail']) t1 =3D time.time() print 'l.search() ' + str(t1 - t0) t0 =3D time.time() res =3D l.result(msgid) t1 =3D time.time() print 'l.result() ' + str(t1 - t0) if __name__ =3D=3D '__main__': ldapsearch() which produces: $ time ./ldaptest.py ldap.initialize() 0.00811719894409 l.bind() 3.45404982567 l.search() 0.00253987312317 l.result() 0.00940012931824 real 0m3.557s user 0m0.030s sys 0m0.070s |
From: <mi...@st...> - 2005-07-26 12:04:12
|
Michael Str=F6der wrote: > Ames Andreas wrote: >=20 >>static char encode_rfc2696__doc__[] =3D "encode_page_control(blabla)"; >=20 > Frankly I'd like to drop __doc__ strings in the C part completely. >=20 > It's much better to define __doc__ strings for the class methods, in > this case methods of class ldap.control.SimplePagedResultsControl. > That's where programmers and tools like pydoc expect them to be. I've checked in a new version of ldapcontrol.c without the __doc__ strings. I'd like to keep the C part under Modules/ as lean as possible. Please test. Ciao, Michael. |
From: <mi...@st...> - 2005-07-26 11:44:14
|
Ames Andreas wrote: > > static char encode_rfc2696__doc__[] = "encode_page_control(blabla)"; Frankly I'd like to drop __doc__ strings in the C part completely. It's much better to define __doc__ strings for the class methods, in this case methods of class ldap.control.SimplePagedResultsControl. That's where programmers and tools like pydoc expect them to be. Ciao, Michael. |