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: Michael <mi...@st...> - 2000-07-27 11:56:01
|
David Leonard wrote: > > i think using Python's own source tree structure as > a basis would be best. > > Demo/ > Doc/ > Lib/ > Module/ Ack. Looks reasonable. Let's do it! > Also I really don't think that this is the right place for > applications. Ack. I regarded lappo as application - one can regard it as demo. E.g. I would *not* want to add web2ldap into python-ldap's tree. Ok, what about the rest of the roadmap? Ciao, Michael. |
From: David L. <dav...@cs...> - 2000-07-27 11:51:48
|
yep. the current CVS directory structure is indeed clumsy. it got that way i think because some bad decisions were made (by me) early on, and with CVS, it is hard to rename directories. (i dont seem to have shell access to the sourceforge machine with the CVS repository otherwise I would do a mv or six!) i think using Python's own source tree structure as a basis would be best. michael's proposed structure is quite similar to this in semantics, and I liked it. renaming his to become consistent with Python's tree you get: Demo/ Doc/ Lib/ Module/ where Module/ contains .c files, Lib/ contains .py libraries, Demo/ contains some sample apps and Doc/ contains .tex files for documentation. This seems really reasonable to me. Also I really don't think that this is the right place for applications. unless you carefully describe such application as convenient ldap libraries :) (which is what the core of fog's gtk code could possible be described as.) otherwise, apps should be independent efforts (not too hard with sourcefogre) or kept in the Demo/ directory. d -- David Leonard Dav...@cs... Dept of Comp. Sci. and Elec. Engg _ Room:78-640 Ph:+61 7 336 51187 The University of Queensland |+| http://www.csee.uq.edu.au/~leonard/ QLD 4072 AUSTRALIA ~` '~ E2A24DC6446E5779D7AFC41AA04E6401 Curses! - Mojo Jojo |
From: Michael <mi...@st...> - 2000-07-27 10:44:51
|
Federico Di Gregorio wrote: > > > > > 6. Distributing with Python's standard lib (low priority): > > > > > > i don't agree on that. > > > > Any good reason why? > > not really. but maintaining a package inside a bigger one, that works > on multiple platforms not widely available to the software author is > not an easy task. but that's David's problem, right? But triggering all package maintainers is not an easy task either. It's not even an easy task to know them all. Ciao, Michael. |
From: <fo...@mi...> - 2000-07-27 10:18:30
|
Scavenging the mail folder uncovered Michael Ströder's letter: > Federico Di Gregorio wrote: > > i would better like to keep code snippets and applications (lappo) > > requiring ldaplib under ldaplib. > > IMHO packages of the module distributions should be kept small. > Well, simple demos could be integrated into the modules but not > larger applications. > > > else an user will download the C > > module and demos only and then write us the the demos do not work... > > A simple table listing which modules are needed by a specific demo > or application helps with that problem. It's just a matter of proper > docs and it's really simple in this particular case (there won't be > so many different demos and applications, I guess). true. it is fine for me. (as long as David agrees.) > > > 6. Distributing with Python's standard lib (low priority): > > > > i don't agree on that. > > Any good reason why? not really. but maintaining a package inside a bigger one, that works on multiple platforms not widely available to the software author is not an easy task. but that's David's problem, right? ciao, federico -- Federico Di Gregorio MIXAD LIVE System Programmer fo...@mi... Debian GNU/Linux Developer & Italian Press Contact fo...@de... The reverse side also has a reverse side. -- Japanese proverb |
From: Michael <mi...@st...> - 2000-07-27 10:12:42
|
Federico Di Gregorio wrote: > > Scavenging the mail folder uncovered Michael Ströder's letter: > > > Please, rename _ldap back to ldap > > if you simply do an "import ldap" you automatically get a > "from _ldap import *" and all the previous code continues working. > **no need** to change a single line of code. Oh, I see. Didn't know that. > > New directories applications/ and demos/ should be created for > > existing applications (e.g. Fog's lappo going into > > applications/lappo/) and small example code snippets for tutorial > > purpose going into demos/. > > i would better like to keep code snippets and applications (lappo) > requiring ldaplib under ldaplib. IMHO packages of the module distributions should be kept small. Well, simple demos could be integrated into the modules but not larger applications. > else an user will download the C > module and demos only and then write us the the demos do not work... A simple table listing which modules are needed by a specific demo or application helps with that problem. It's just a matter of proper docs and it's really simple in this particular case (there won't be so many different demos and applications, I guess). > > 6. Distributing with Python's standard lib (low priority): > > i don't agree on that. Any good reason why? > distribution makers like redhat or debian will > bundle python-ldap anyway. But think of e.g. a Win32 distribution, FreeBSD ports or Python on AS/400. Up to now there are no package maintainers for those platforms. If python-ldap's modules are integrated into the Python distribution it makes life *much* easier on all platforms. Well, it's just a low-priority goal to be reached during the next year. > ah! and Win2000 Active Directory is not > compatible with standard ldap... There are different scopes of compability with LDAP. But that's another story probably off-topic here. Ciao, Michael. |
From: Michael <mi...@st...> - 2000-07-27 09:54:06
|
HI! I updated my CVS directory copy of python-ldap yesterday and tried to build ldapmodule against my installed OpenLDAP 1.2.11 libs. 1. I was confused wether to use ldap-module/ldapmodule/ or python-ldap/ldapmodule/. 2. Without having any seriously knowledge of autoconf I created a configure script by running autoconf in python-ldap/ldapmodule/. I both directories the build failed with: michael@junker:~/temp/python-ldap/ldap-module/ldapmodule > make gcc -fpic -DLDAP_REFERRALS -DWITH_KERBEROS -O2 -m486 -I/usr/include/python1.5 -I/usr/include/python1.5 -DHAVE_CONFIG_H -c ./LDAPObject.c ./LDAPObject.c: In function `l_ldap_modrdn': ./LDAPObject.c:1069: too many arguments to function `ldap_modrdn' ./LDAPObject.c: In function `l_ldap_modrdn_s': ./LDAPObject.c:1093: too many arguments to function `ldap_modrdn_s' make: *** [LDAPObject.o] Error 1 Ciao, Michael. |
From: <fo...@mi...> - 2000-07-27 09:53:23
|
Scavenging the mail folder uncovered Michael Ströder's letter: > Please, rename _ldap back to ldap and rename Fog's stuff to > LDAPObjects, ldapobj, ldaplib or a similar name since Fog's stuff is > not widely used or documented up to now. standard for python extension written in C is _ldap in a ldapmodule.so library. if you simply do an "import ldap" you automatically get a "from _ldap import *" and all the previous code continues working. **no need** to change a single line of code. > 2. CVS (high priority): > ----------------------- > The CVS repository is not very clear for newbies who don't know the > history. > > ldap-module/ > > Seems to be the old stuff. We should get rid of this directory > completely to avoid confusion. > > python-ldap/ldaplib/ > python-ldap/ldapmodule/ > > These both directories should be at top of CVS tree since the > project is already called python-ldap. A sub-directory python-ldap/ > seems redundant if ldap-module/ is removed. BTW: ldapmodule and > ldaplib should be distributed in separated release packages. i agree. > New directories applications/ and demos/ should be created for > existing applications (e.g. Fog's lappo going into > applications/lappo/) and small example code snippets for tutorial > purpose going into demos/. i would better like to keep code snippets and applications (lappo) requiring ldaplib under ldaplib. else an user will download the C module and demos only and then write us the the demos do not work... > 5. LDAPObjects (low priority): > ------------------------------ > We have to review Fog's work (hopefully I have the time!) to > establish a standard Pythonish, re-usable and robust class library > for LDAP applications. i agree (on the review part.) my work on LDAPObject is stalled mainly because i received no input and (apart from lappo) i don't use my own code very much (waiting for ssl, then we'll move all out ns to ldap and will be a different story...) > 6. Distributing with Python's standard lib (low priority): > ---------------------------------------------------------- > Although G.v.R. seems to be not very open for third-party modules we > should have the goal to integrate the whole python-ldap stuff into > the Python standard distribution because LDAP is a protocol which > gets more and more important for application developers (e.g. > regarding single sign-on environments, Win2000 Active Directory > etc.). i don't agree on that. distribution makers like redhat or debian will bundle python-ldap anyway. ah! and Win2000 Active Directory is not compatible with standard ldap... ciao, federico -- Federico Di Gregorio MIXAD LIVE System Programmer fo...@mi... Debian GNU/Linux Developer & Italian Press Contact fo...@de... Don't dream it. Be it. -- Dr. Frank'n'further |
From: Michael <mi...@st...> - 2000-07-27 09:22:27
|
David Leonard wrote: > > On Wed, 26 Jul 2000, Michael Ströder typed thusly: > > > Hmm, does that make sense? > > well, the display templates appear to be a semi-standard way of describing > templates. its not very nice, i admit, but my allow some reuse. I can't imagine a case where somebody seriously wants to re-use rusty C-modeled code in a Python design. Ciao, Michael. |
From: Michael <mi...@st...> - 2000-07-27 09:22:14
|
HI! I see a strong need for a defined roadmap for python-ldap. The current situation on the web pages looks rather confusing for users of the ldapmodule. Some suggestions (and I hope some silent readers of this list jump into this discussion): 1. Module names (high priority): -------------------------------- When renaming was done from ldap to _ldap I did not thought about it thoroughly enough. But now it seems to me that it breaks a lot of existing code and produces much confusion when updating. There are some web articles describing example code etc., too (e.g. http://www.sunworld.com/sunworldonline/swol-01-2000/swol-01-ldap3_p.html). E.g. S.u.S.E. delivers ldapmodule 1.5 with their Linux distribution and it's much easier to explain users how to upgrade if the old naming is used. Please, rename _ldap back to ldap and rename Fog's stuff to LDAPObjects, ldapobj, ldaplib or a similar name since Fog's stuff is not widely used or documented up to now. 2. CVS (high priority): ----------------------- The CVS repository is not very clear for newbies who don't know the history. ldap-module/ Seems to be the old stuff. We should get rid of this directory completely to avoid confusion. python-ldap/ldaplib/ python-ldap/ldapmodule/ These both directories should be at top of CVS tree since the project is already called python-ldap. A sub-directory python-ldap/ seems redundant if ldap-module/ is removed. BTW: ldapmodule and ldaplib should be distributed in separated release packages. IMHO the CVS repository could be simplified and expanded to htdocs/ ldaplib/ ldapmodule/ applications/ demos/ New directories applications/ and demos/ should be created for existing applications (e.g. Fog's lappo going into applications/lappo/) and small example code snippets for tutorial purpose going into demos/. 3. Release of C-module (high priority): --------------------------------------- Make a new stable, well tested and compatible release of the C ldapmodule AS SOON AS POSSIBLE and publish it on the SourceForge web page. Especially the fixes for memory leaking etc. are important for serious application developers. This could contain Fog's stuff marked as still being experimental. This is highly needed as a base for package maintainers like mir...@in... (see Red Hat-packages on http://www.webideal.de/ldap/) or S.u.S.E (I will trigger them both). 4. SSL (medium priority): ------------------------- There are a lot of applications where confidentiality of transmitted data has to be guaranteed => LDAP over SSL is highly needed. ldapmodule can be linked to Netscape SDK which has SSL support. Also it's worth looking at OpenLDAP 2.0's new API because this will be the new standard API for LDAP. Although I can't help with C programming I can help with investigating the needs for certificate handling etc. 5. LDAPObjects (low priority): ------------------------------ We have to review Fog's work (hopefully I have the time!) to establish a standard Pythonish, re-usable and robust class library for LDAP applications. 6. Distributing with Python's standard lib (low priority): ---------------------------------------------------------- Although G.v.R. seems to be not very open for third-party modules we should have the goal to integrate the whole python-ldap stuff into the Python standard distribution because LDAP is a protocol which gets more and more important for application developers (e.g. regarding single sign-on environments, Win2000 Active Directory etc.). Please, let me know what you think. Ciao, Michael. |
From: David L. <dav...@cs...> - 2000-07-27 01:42:05
|
On Wed, 26 Jul 2000, Michael Ströder typed thusly: > > > > i've been working on adding a display template object into > > > > ldapmodule this morning. > Hmm, does that make sense? I mean the Pythonish way of using string > format templates for printing the entry's dictionaries is much > easier and more flexible. Personally speaking, the display template > of OpenLDAP are not much of use. well, the display templates appear to be a semi-standard way of describing templates. its not very nice, i admit, but my allow some reuse. > I would prefer to have LDAP/SSL if you have some spare time for > working on the C LDAP module... please, please, please...Netscape > SDK, OpenLDAP 2.0... ok.. hmmm d -- David Leonard Dav...@cs... Dept of Comp. Sci. and Elec. Engg _ Room:78-640 Ph:+61 7 336 51187 The University of Queensland |+| http://www.csee.uq.edu.au/~leonard/ QLD 4072 AUSTRALIA ~` '~ E2A24DC6446E5779D7AFC41AA04E6401 Curses! - Mojo Jojo |
From: David L. <dav...@cs...> - 2000-07-27 01:33:37
|
On Wed, 26 Jul 2000, Michael Ströder typed thusly: > What are the symbols ldap.*_30? LDAPv3-related? yes, they seem to be. they are symbols from the header file <ldap.h> and have comments such as /* 3.0 compatibility auth methods */ #define LDAP_AUTH_SIMPLE_30 0xa0L /* context specific + constructed */ #define LDAP_AUTH_KRBV41_30 0xa1L /* context specific + constructed */ #define LDAP_AUTH_KRBV42_30 0xa2L /* context specific + constructed */ -- David Leonard Dav...@cs... Dept of Comp. Sci. and Elec. Engg _ Room:78-640 Ph:+61 7 336 51187 The University of Queensland |+| http://www.csee.uq.edu.au/~leonard/ QLD 4072 AUSTRALIA ~` '~ E2A24DC6446E5779D7AFC41AA04E6401 Curses! - Mojo Jojo |
From: David L. <dav...@cs...> - 2000-07-27 01:30:11
|
On Wed, 26 Jul 2000, Michael Ströder typed thusly: > > > thats what i reckon... and i'll change it so, if nobody seriously > > > objects..? > > ignore my insane ravings. all exceptions are derived from a base exception > > class and seem to have been for a couple of versions. > > I'm trying to catch a ldap.error base class (using 1.9-alpha) but > did not succeed. Did I do something wrong? i don't know... it should work. I'm using PyErr_NewException() to create new exception classes... will try to test here > Hmm, it would make sense to add a constant ldap.moduleversion > symbol... its already there, as __version__ :) >>> import _ldap >>> _ldap.__version__ '1.9' d -- David Leonard Dav...@cs... Dept of Comp. Sci. and Elec. Engg _ Room:78-640 Ph:+61 7 336 51187 The University of Queensland |+| http://www.csee.uq.edu.au/~leonard/ QLD 4072 AUSTRALIA ~` '~ E2A24DC6446E5779D7AFC41AA04E6401 Curses! - Mojo Jojo |
From: Michael <mi...@st...> - 2000-07-26 20:57:51
|
HI! There was some discussion about solving memory leaks. Are this problems solved with the CVS version? I was experiencing memory leaking when running web2ldap as multi-threaded web server. Forking mode was not leaking. Maybe I have another bug... Ciao, Michael. -- Michael Ströder Tel.: +49 (0721)-8304316 Schillerstr. 9 E-Mail: mi...@st... 76135 Karlsruhe, Germany http://www.stroeder.com |
From: Michael <mi...@st...> - 2000-07-26 19:15:35
|
David Leonard wrote: > > On Wed, 26 Jul 2000, Michael Ströder typed thusly: > > > I can contribute some code for reading and writing LDIF (see > > gzipped-attachment). Maybe you want to include this module in your > > software repository. > > yes - looks good. will include. DSML (http://www.dsml.org/) will follow... Ciao, Michael. |
From: Michael <mi...@st...> - 2000-07-26 19:15:35
|
HI! What are the symbols ldap.*_30? LDAPv3-related? Ciao, Michael. |
From: Michael <mi...@st...> - 2000-07-26 19:15:35
|
David Leonard wrote: > > On Wed, 26 Jul 2000, Michael Ströder typed thusly: > > > > i've been working on adding a display template object into > > > ldapmodule this morning. > > Into the Python part or the C part based on the OpenLDAP libs? > > the c part Hmm, does that make sense? I mean the Pythonish way of using string format templates for printing the entry's dictionaries is much easier and more flexible. Personally speaking, the display template of OpenLDAP are not much of use. I would prefer to have LDAP/SSL if you have some spare time for working on the C LDAP module... please, please, please...Netscape SDK, OpenLDAP 2.0... Ciao, Michael. |
From: Michael <mi...@st...> - 2000-07-26 19:15:35
|
David Leonard wrote: > > On Wed, 26 Jul 2000, David Leonard typed thusly: > > > thats what i reckon... and i'll change it so, if nobody seriously > > objects..? > > ignore my insane ravings. all exceptions are derived from a base exception > class and seem to have been for a couple of versions. I'm trying to catch a ldap.error base class (using 1.9-alpha) but did not succeed. Did I do something wrong? Hmm, it would make sense to add a constant ldap.moduleversion symbol... Ciao, Michael. |
From: David L. <dav...@cs...> - 2000-07-26 10:22:03
|
On Wed, 26 Jul 2000, David Leonard typed thusly: > thats what i reckon... and i'll change it so, if nobody seriously objects..? ignore my insane ravings. all exceptions are derived from a base exception class and seem to have been for a couple of versions. i have deleted misleading comments -- David Leonard Dav...@cs... Dept of Comp. Sci. and Elec. Engg _ Room:78-640 Ph:+61 7 336 51187 The University of Queensland |+| http://www.csee.uq.edu.au/~leonard/ QLD 4072 AUSTRALIA ~` '~ E2A24DC6446E5779D7AFC41AA04E6401 Curses! - Mojo Jojo |
From: David L. <dav...@cs...> - 2000-07-26 10:19:02
|
On Wed, 26 Jul 2000, Federico Di Gregorio typed thusly: > I think adding the required methods to ldaplib (the python part) is > pretty easy. i'll do if there is enough request. i request :) > (well, i am commiting...) some code for schema support. nothing really > working but if you want to give it a look, try the schema_test.py > script (michael?)... -- David Leonard Dav...@cs... Dept of Comp. Sci. and Elec. Engg _ Room:78-640 Ph:+61 7 336 51187 The University of Queensland |+| http://www.csee.uq.edu.au/~leonard/ QLD 4072 AUSTRALIA ~` '~ E2A24DC6446E5779D7AFC41AA04E6401 Curses! - Mojo Jojo |
From: David L. <dav...@cs...> - 2000-07-26 10:12:51
|
On Wed, 26 Jul 2000, Michael Ströder typed thusly: > David Leonard wrote: > > this worries me. should the PARAM_ERROR, NO_SUCH_OBJECT and > > NO_SUCH_ATTRIBUTE > > errors not be mapped into python exceptions in the next release? won't this > > break existing code?? > > I'm making heavy use of e.g. catching ldap.NO_SUCH_OBJECT. ok your code won't break; but those people who noticed that ValueError, AttributeError etc are being thrown and instead use those names will be bitten. > But all exceptions should be derived from ldap.LDAPError or whatever > it's called. thats what i reckon... and i'll change it so, if nobody seriously objects..? d -- David Leonard Dav...@cs... Dept of Comp. Sci. and Elec. Engg _ Room:78-640 Ph:+61 7 336 51187 The University of Queensland |+| http://www.csee.uq.edu.au/~leonard/ QLD 4072 AUSTRALIA ~` '~ E2A24DC6446E5779D7AFC41AA04E6401 Curses! - Mojo Jojo |
From: David L. <dav...@cs...> - 2000-07-26 10:10:00
|
On Wed, 26 Jul 2000, Michael Ströder typed thusly: > David Leonard wrote: > > > > def printLDIF(self): > > '''printLDIF(self)''' > > I can contribute some code for reading and writing LDIF (see > gzipped-attachment). Maybe you want to include this module in your > software repository. yes - looks good. will include. -- David Leonard Dav...@cs... Dept of Comp. Sci. and Elec. Engg _ Room:78-640 Ph:+61 7 336 51187 The University of Queensland |+| http://www.csee.uq.edu.au/~leonard/ QLD 4072 AUSTRALIA ~` '~ E2A24DC6446E5779D7AFC41AA04E6401 Curses! - Mojo Jojo |
From: David L. <dav...@cs...> - 2000-07-26 09:19:16
|
On Wed, 26 Jul 2000, Michael Ströder typed thusly: > > i've been working on adding a display template object into > > ldapmodule this morning. > Into the Python part or the C part based on the OpenLDAP libs? the c part /* David Leonard <dav...@cs...>, 2000. Public domain. */ /* * DispTmplObject - wrapper around an LDAP Display Template (disptmpl) * $Id$ */ #include "common.h" #if defined(HAVE_LDAP_INIT_TEMPLATES) #include "lber.h" #include "ldap.h" #include "disptmpl.h" #include "linkedlist.h" #include "template.h" PyObject *DispTmpl_Error; PyObject *DispTmpl_VersionError; PyObject *DispTmpl_SyntaxError; LinkedListType DispTmplSeq_Type; LinkedListType DispTmplRowSeq_Type; LinkedListType DispTmplColSeq_Type; static PyObject *DispTmplSeq_new(struct ldap_disptmpl *); static PyObject *DispTmplRowSeq_new(DispTmplObject *); static PyObject *DispTmplColSeq_new(DispTmplRowSeqObject *, struct ldap_tmplitem *); static PyObject *DispTmplItem_new(DispTmplObject *, struct ldap_tmplitem *); static PyObject *DispTmpl_new(struct ldap_disptmpl *, DispTmplSeqObject *); static PyObject * makestring(s) char *s; { if (s != NULL) return PyString_FromString(s); Py_INCREF(Py_None); return Py_None; } /*------------------------------------------------------------ * DispTmplSeq: a sequence of templates */ static PyObject * DispTmplSeq_new(tmpllist) struct ldap_disptmpl *tmpllist; { DispTmplSeqObject *seq; struct ldap_disptmpl *t; struct ldap_tmplitem *r, *c; seq = (DispTmplSeqObject *)LinkedList_new(&DispTmplSeq_Type); seq->tmpllist = tmpllist; /* clear all the application data fields */ for (t = ldap_first_disptmpl(tmpllist); t; t = ldap_next_disptmpl(tmpllist, t)) { LDAP_SET_DISPTMPL_APPDATA(t, NULL); for (r = ldap_first_tmplrow(t); r; r = ldap_next_tmplrow(t, r)) for (c = ldap_first_tmplcol(t, r); c; c = ldap_next_tmplcol(t, r, c)) LDAP_SET_TMPLITEM_APPDATA(c, NULL); } return (PyObject *)seq; } /* Deallocate */ static void DispTmplSeq_dealloc(self) DispTmplSeqObject *self; { struct ldap_disptmpl *t; struct ldap_tmplitem *r, *c; /* Deallocate any application data */ for (t = ldap_first_disptmpl(self->tmpllist); t; t = ldap_next_disptmpl(self->tmpllist, t)) { Py_XDECREF(LDAP_GET_DISPTMPL_APPDATA(t, PyObject *)); for (r = ldap_first_tmplrow(t); r; r = ldap_next_tmplrow(t, r)) for (c = ldap_first_tmplcol(t, r); c; c = ldap_next_tmplcol(t, r, c)) Py_XDECREF(LDAP_GET_TMPLITEM_APPDATA(c, PyObject *)); } ldap_free_templates(self->tmpllist); PyMem_DEL((PyObject *)self); } /* first in list */ static struct ldap_disptmpl * DispTmplSeq_first(self) DispTmplSeqObject *self; { return ldap_first_disptmpl(self->tmpllist); } /* next in list */ static struct ldap_disptmpl * DispTmplSeq_next(self, tmpl) DispTmplSeqObject *self; struct ldap_disptmpl *tmpl; { return ldap_next_disptmpl(self->tmpllist, tmpl); } /* create object from pointer into list */ static PyObject * DispTmplSeq_item(self, tmpl) DispTmplSeqObject *self; struct ldap_disptmpl *tmpl; { return DispTmpl_new(tmpl, self); } /* retrieve a template by name */ static PyObject * DispTmplSeq_name2template(self, args) DispTmplSeqObject *self; PyObject *args; { struct ldap_disptmpl *t; char *s; if (!PyArg_ParseTuple(args, "s", &s)) return NULL; t = ldap_name2template(s, self->tmpllist); if (t == NULL) { Py_INCREF(Py_None); return Py_None; } return DispTmpl_new(t, self); } static char DispTmplSeq_name2template_doc[] = "name2template(name) -> template\n" "Do stuff."; /* retrieve a template by objectClass */ static PyObject * DispTmplSeq_oc2template(self, args) DispTmplSeqObject *self; PyObject *args; { struct ldap_disptmpl *t; PyObject *seq, *o; char **strs; int len, i; if (!PyArg_ParseTuple(args, "O", &seq)) return NULL; if (!PySequence_Check(seq)) { PyErr_SetString(PyExc_TypeError, "expected list of strings"); return NULL; } len = PySequence_Length(seq); strs = (char **)malloc(sizeof (char *) * (len + 1)); if (strs == NULL) return PyErr_NoMemory(); for (i = 0; i < len; i++) { o = PySequence_GetItem(seq, i); if (!PyString_Check(o)) { PyErr_SetString(PyExc_TypeError, "expected list of strings"); free(strs); return NULL; } strs[i] = PyString_AsString(o); } strs[len] = NULL; t = ldap_oc2template(strs, self->tmpllist); free(strs); if (t == NULL) { Py_INCREF(Py_None); return Py_None; } return DispTmpl_new(t, self); } static char DispTmplSeq_oc2template_doc[] = "oc2template(list of strings) -> template\n" "Do stuff."; static PyMethodDef DispTmplSeq_methods[] = { { "name2template", (PyCFunction)DispTmplSeq_name2template, METH_VARARGS, DispTmplSeq_name2template_doc }, { "oc2template", (PyCFunction)DispTmplSeq_oc2template, METH_VARARGS, DispTmplSeq_oc2template_doc }, { NULL, NULL } }; PyObject * DispTmplSeq_getattr(self, name) LinkedListObject *self; char *name; { return Py_FindMethod(DispTmplSeq_methods, (PyObject *)self, name); } /*------------------------------------------------------------ * DispTmplRowSeq: a sequence of rows */ /* new row sequence */ static PyObject * DispTmplRowSeq_new(template) DispTmplObject *template; { DispTmplRowSeqObject *rowseq; rowseq = (DispTmplRowSeqObject *)LinkedList_new( &DispTmplRowSeq_Type); rowseq->tmplobj = template; Py_INCREF(template); return (PyObject *)rowseq; } /* deallocate */ static void DispTmplRowSeq_dealloc(self) DispTmplRowSeqObject *self; { Py_DECREF(self->tmplobj); PyMem_DEL((PyObject *)self); } /* first in list */ static struct ldap_tmplitem * DispTmplRowSeq_first(self) DispTmplRowSeqObject *self; { return ldap_first_tmplrow(self->tmplobj->disptmpl); } /* next in list */ static struct ldap_tmplitem * DispTmplRowSeq_next(self, row) DispTmplRowSeqObject *self; struct ldap_tmplitem *row; { return ldap_next_tmplrow(self->tmplobj->disptmpl, row); } /* return a row (sequence of columns) */ static PyObject * DispTmplRowSeq_item(self, cols) DispTmplRowSeqObject *self; struct ldap_tmplitem *cols; { return DispTmplColSeq_new(self, cols); } /*------------------------------------------------------------ * DispTmplColSeq: a sequence of columns */ /* new columns */ static PyObject * DispTmplColSeq_new(rowseq, row) DispTmplRowSeqObject *rowseq; struct ldap_tmplitem *row; { DispTmplColSeqObject *colseq; colseq = (DispTmplColSeqObject *)LinkedList_new( &DispTmplColSeq_Type); colseq->tmplobj = rowseq->tmplobj; Py_INCREF(colseq->tmplobj); colseq->row = row; return (PyObject *)colseq; } /* Deallocate */ static void DispTmplColSeq_dealloc(self) DispTmplColSeqObject *self; { Py_DECREF(self->tmplobj); PyMem_DEL((PyObject *)self); } /* first in list */ static struct ldap_tmplitem * DispTmplColSeq_first(self) DispTmplColSeqObject *self; { return ldap_first_tmplcol(self->tmplobj->disptmpl, self->row); } /* next in list */ static struct ldap_tmplitem * DispTmplColSeq_next(self, col) DispTmplColSeqObject *self; struct ldap_tmplitem *col; { return ldap_next_tmplcol(self->tmplobj->disptmpl, self->row, col); } /* extract item from current column */ static PyObject * DispTmplColSeq_item(self, item) DispTmplColSeqObject *self; struct ldap_tmplitem *item; { return DispTmplItem_new(self->tmplobj, item); } /*------------------------------------------------------------ * template item */ static struct { long attr; char *name; PyObject *intern; } anam[] = { { LDAP_DITEM_OPT_READONLY, "readonly" }, { LDAP_DITEM_OPT_SORTVALUES, "sortvalues" }, { LDAP_DITEM_OPT_SINGLEVALUED, "singlevalued" }, { LDAP_DITEM_OPT_VALUEREQUIRED, "valuerequired" }, { LDAP_DITEM_OPT_HIDEIFEMPTY, "hideifempty" }, { LDAP_DITEM_OPT_HIDEIFFALSE, "hideiffalse" }, }; static int nanam = sizeof anam / sizeof anam[0]; /* deallocate item */ static PyObject * DispTmplItem_repr(self) DispTmplItemObject *self; { char *label; char buf[1024]; label = self->item->ti_label; fprintf(stderr, "label=%p\n", label); if (label == NULL) return PyString_FromString("<TemplateItem>"); snprintf(buf, sizeof buf, "<TemplateItem %s>", label); fprintf(stderr, "buf='%s'\n", buf); return PyString_FromString(buf); } /* deallocate item */ static void DispTmplItem_dealloc(self) DispTmplItemObject *self; { /* Note: appdata is released later */ Py_DECREF(self->tmplobj); PyMem_DEL((PyObject *)self); } /* read an attribute */ static PyObject * DispTmplItem_getattr(self, attr) DispTmplItemObject *self; char *attr; { if (streq(attr, "__members__")) return Py_BuildValue("[ssssss]", "appdata", "attrname", "label", "args", "options", "syntaxid"); if (streq(attr, "appdata")) { PyObject *data; data = LDAP_GET_TMPLITEM_APPDATA(self->item, PyObject *); if (data == NULL) data = Py_None; Py_INCREF(data); return data; } if (streq(attr, "attrname")) return makestring(self->item->ti_attrname); if (streq(attr, "label")) return makestring(self->item->ti_label); if (streq(attr, "args")) { int i; PyObject *tuple; for (i = 0; self->item->ti_args[i]; i++) ; tuple = PyTuple_New(i); for (i = 0; self->item->ti_args[i]; i++) PyTuple_SetItem(tuple, i, PyString_FromString( self->item->ti_args[i])); return tuple; } if (streq(attr, "options")) { int i, len; PyObject *tuple; for (len = i = 0; i < nanam; i++) if (LDAP_IS_TMPLITEM_OPTION_SET(self->item, anam[i].attr)) len++; tuple = PyTuple_New(len); for (len = i = 0; i < nanam; i++) if (LDAP_IS_TMPLITEM_OPTION_SET(self->item, anam[i].attr)) { PyTuple_SetItem(tuple, len, anam[i].intern); Py_INCREF(anam[i].intern); len++; } return tuple; } if (streq(attr, "syntaxid")) return PyInt_FromLong(self->item->ti_syntaxid); PyErr_SetString(PyExc_AttributeError, attr); return NULL; } /* set an attribute */ static int DispTmplItem_setattr(self, attr, value) DispTmplItemObject *self; char *attr; PyObject *value; { if (streq(attr, "appdata")) { Py_XDECREF(LDAP_GET_TMPLITEM_APPDATA(self->item, PyObject *)); LDAP_SET_TMPLITEM_APPDATA(self->item, value); Py_INCREF(value); return 0; } PyErr_SetString(PyExc_AttributeError, attr); return -1; } static PyTypeObject DispTmplItem_Type = { #ifdef WIN32 PyObject_HEAD_INIT(NULL) #else /* ! WIN32 */ PyObject_HEAD_INIT(&PyType_Type) #endif /* ! WIN32 */ sizeof(DispTmplItemObject),/*ob_size*/ "DispTmplItem", /*tp_name*/ 0, /*tp_basicsize*/ 0, /*tp_itemsize*/ /* methods */ (destructor)DispTmplItem_dealloc,/*tp_dealloc*/ 0, /*tp_print*/ (getattrfunc)DispTmplItem_getattr, /*tp_getattr*/ (setattrfunc)DispTmplItem_setattr, /*tp_setattr*/ 0, /*tp_compare*/ (reprfunc)DispTmplItem_repr, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ }; static PyObject * DispTmplItem_new(tmplobj, item) DispTmplObject *tmplobj; struct ldap_tmplitem *item; { DispTmplItemObject *obj; obj = PyObject_NEW(DispTmplItemObject, &DispTmplItem_Type); obj->tmplobj = tmplobj; Py_INCREF(tmplobj); obj->item = item; return (PyObject *)obj; } /*------------------------------------------------------------ * Template */ /* deallocate item */ static void DispTmpl_dealloc(self) DispTmplObject *self; { /* Note: appdata is released later */ Py_DECREF(self->tmplseqobj); PyMem_DEL((PyObject *)self); } static PyObject * DispTmpl_tmplattrs(self, args) PyObject *self, *args; { PyErr_SetNone(PyExc_NotImplementedError); return NULL; } static char DispTmpl_tmplattrs_doc[] = "tmplattrs() -> \n" "Do stuff."; static PyMethodDef DispTmpl_methods[] = { { "tmplattrs", (PyCFunction)DispTmpl_tmplattrs, METH_VARARGS, DispTmpl_tmplattrs_doc }, { NULL, NULL } }; static struct { long attr; char *name; PyObject *intern; } tnam[] = { { LDAP_DTMPL_OPT_ADDABLE, "addable" }, { LDAP_DTMPL_OPT_ALLOWMODRDN, "allowmodrdn" }, { LDAP_DTMPL_OPT_ALTVIEW, "altview" }, }; static int ntnam = sizeof tnam / sizeof tnam[0]; /* get an attribute */ static PyObject * DispTmpl_getattr(self, attr) DispTmplObject *self; char *attr; { if (streq(attr, "__members__")) return Py_BuildValue("[sssssssssss]", "items", "appdata", "options", "name", "pluralname", "iconname", "authattrname", "defrdnattrname", "defaddlocation", "oclist", "adddeflist"); if (streq(attr, "items")) return DispTmplRowSeq_new(self); if (streq(attr, "appdata")) { PyObject *data; data = LDAP_GET_DISPTMPL_APPDATA(self->disptmpl, PyObject *); if (data == NULL) data = Py_None; Py_INCREF(data); return data; } if (streq(attr, "options")) { int i, len; PyObject *tuple; for (len = i = 0; i < ntnam; i++) if (LDAP_IS_DISPTMPL_OPTION_SET(self->disptmpl, tnam[i].attr)) len++; tuple = PyTuple_New(len); for (len = i = 0; i < ntnam; i++) if (LDAP_IS_DISPTMPL_OPTION_SET(self->disptmpl, tnam[i].attr)) { PyTuple_SetItem(tuple, len, tnam[i].intern); Py_INCREF(tnam[i].intern); len++; } return tuple; } if (streq(attr, "name")) return makestring(self->disptmpl->dt_name); if (streq(attr, "pluralname")) return makestring(self->disptmpl->dt_pluralname); if (streq(attr, "iconname")) return makestring(self->disptmpl->dt_iconname); if (streq(attr, "authattrname")) return makestring(self->disptmpl->dt_authattrname); if (streq(attr, "defrdnattrname")) return makestring(self->disptmpl->dt_defrdnattrname); if (streq(attr, "defaddlocation")) return makestring(self->disptmpl->dt_defaddlocation); if (streq(attr, "oclist")) { struct ldap_oclist *ocl = self->disptmpl->dt_oclist; struct ldap_oclist *o; int i; PyObject *tuple; for (i = 0, o = ocl; o; i++, o = o->oc_next) i++; tuple = PyTuple_New(i); for (i = 0, o = ocl; o; i++, o = o->oc_next) { PyObject *names; int j; for (j = 0; o->oc_objclasses[j]; j++) ; names = PyTuple_New(j); for (j = 0; o->oc_objclasses[j]; j++) PyTuple_SetItem(names, j, PyString_FromString(o->oc_objclasses[j])); PyTuple_SetItem(tuple, i, names); } return tuple; } if (streq(attr, "adddeflist")) { } return Py_FindMethod(DispTmpl_methods, (PyObject *)self, attr); } /* set an attribute */ static int DispTmpl_setattr(self, attr, value) DispTmplObject *self; char *attr; PyObject *value; { if (streq(attr, "appdata")) { Py_XDECREF(LDAP_GET_DISPTMPL_APPDATA(self->disptmpl, PyObject *)); LDAP_SET_DISPTMPL_APPDATA(self->disptmpl, value); Py_INCREF(value); return 0; } PyErr_SetString(PyExc_AttributeError, attr); return -1; } static PyTypeObject DispTmpl_Type = { #ifdef WIN32 PyObject_HEAD_INIT(NULL) #else /* ! WIN32 */ PyObject_HEAD_INIT(&PyType_Type) #endif /* ! WIN32 */ sizeof(DispTmplObject), /*ob_size*/ "DispTmpl", /*tp_name*/ 0, /*tp_basicsize*/ 0, /*tp_itemsize*/ /* methods */ (destructor)DispTmpl_dealloc,/*tp_dealloc*/ 0, /*tp_print*/ (getattrfunc)DispTmpl_getattr, /*tp_getattr*/ (setattrfunc)DispTmpl_setattr, /*tp_setattr*/ 0, /*tp_compare*/ (reprfunc)0, /*tp_repr*/ 0, /*tp_as_number*/ 0, /*tp_as_sequence*/ 0, /*tp_as_mapping*/ 0, /*tp_hash*/ }; static PyObject * DispTmpl_new(disptmpl, tmplseq) struct ldap_disptmpl *disptmpl; DispTmplSeqObject *tmplseq; { DispTmplObject *obj; obj = PyObject_NEW(DispTmplObject, &DispTmpl_Type); obj->tmplseqobj = tmplseq; Py_INCREF(tmplseq); obj->disptmpl = disptmpl; return (PyObject *)obj; } /*------------------------------------------------------------ * module-level methods */ /* create a sequence of templates */ PyObject * l_init_templates(self, args) PyObject *self, *args; { struct ldap_disptmpl *tmpllist; PyObject *bufobj; const void *buf; int buflen; int err; if (!PyArg_ParseTuple(args, "O", &bufobj)) return NULL; if (PyObject_AsReadBuffer(bufobj, &buf, &buflen) == -1) return NULL; err = ldap_init_templates_buf((char *)buf, buflen, &tmpllist); switch (err) { case LDAP_TMPL_ERR_MEM: return PyErr_NoMemory(); case 0: return DispTmplSeq_new(tmpllist); case LDAP_TMPL_ERR_SYNTAX: PyErr_SetNone(DispTmpl_VersionError); return NULL; case LDAP_TMPL_ERR_VERSION: PyErr_SetNone(DispTmpl_VersionError); return NULL; default: PyErr_SetString(PyExc_SystemError, "unexpected return value from ldap_init_templates_buf"); return NULL; } } char l_init_templates_doc[] = "init_templates_buf(buffer) -> templates\n" "Do stuff."; void LDAPinit_template(dict) PyObject *dict; { int i; LinkedList_inittype(&DispTmplSeq_Type, "DispTmplSeq", sizeof (DispTmplSeqObject), (firstfunc)DispTmplSeq_first, (nextfunc)DispTmplSeq_next, (itemfunc)DispTmplSeq_item); DispTmplSeq_Type.llt_type.tp_dealloc = DispTmplSeq_dealloc; DispTmplSeq_Type.llt_type.tp_getattr = DispTmplSeq_getattr; LinkedList_inittype(&DispTmplRowSeq_Type, "DispTmplRowSeq", sizeof (DispTmplRowSeqObject), (firstfunc)DispTmplRowSeq_first, (nextfunc)DispTmplRowSeq_next, (itemfunc)DispTmplRowSeq_item); DispTmplRowSeq_Type.llt_type.tp_dealloc = DispTmplRowSeq_dealloc; LinkedList_inittype(&DispTmplColSeq_Type, "DispTmplColSeq", sizeof (DispTmplColSeqObject), (firstfunc)DispTmplColSeq_first, (nextfunc)DispTmplColSeq_next, (itemfunc)DispTmplColSeq_item); DispTmplColSeq_Type.llt_type.tp_dealloc = DispTmplColSeq_dealloc; DispTmpl_Error = PyErr_NewException("ldap.TemplateError", NULL, NULL); PyDict_SetItemString(dict, "TemplateError", DispTmpl_Error); DispTmpl_VersionError = PyErr_NewException( "ldap.TemplateVersionError", DispTmpl_Error, NULL); PyDict_SetItemString(dict, "TemplateVersionError", DispTmpl_VersionError); DispTmpl_SyntaxError = PyErr_NewException( "ldap.TemplateSyntaxError", DispTmpl_Error, NULL); PyDict_SetItemString(dict, "TemplateSyntaxError", DispTmpl_SyntaxError); for (i = 0; i < nanam; i++) anam[i].intern = PyString_FromString(anam[i].name); for (i = 0; i < ntnam; i++) tnam[i].intern = PyString_FromString(tnam[i].name); #define setval(n) PyDict_SetItemString(dict, #n, PyInt_FromLong(LDAP_##n)) setval(SYN_TYPE_TEXT); setval(SYN_TYPE_IMAGE); setval(SYN_TYPE_BOOLEAN); setval(SYN_TYPE_BUTTON); setval(SYN_TYPE_ACTION); setval(SYN_OPT_DEFER); setval(SYN_CASEIGNORESTR); setval(SYN_MULTILINESTR); setval(SYN_DN); setval(SYN_BOOLEAN); setval(SYN_JPEGIMAGE); setval(SYN_JPEGBUTTON); setval(SYN_FAXIMAGE); setval(SYN_FAXBUTTON); setval(SYN_AUDIOBUTTON); setval(SYN_TIME); setval(SYN_DATE); setval(SYN_LABELEDURL); setval(SYN_SEARCHACTION); setval(SYN_LINKACTION); setval(SYN_ADDDNACTION); setval(SYN_VERIFYDNACTION); setval(SYN_RFC822ADDR); } #endif /* ! HAVE_LDAP_INIT_TEMPLATES */ /* * To Do: * implement comparison between objects. someone is bound to * want to compare two row/cell/template objects. */ -- David Leonard Dav...@cs... Dept of Comp. Sci. and Elec. Engg _ Room:78-640 Ph:+61 7 336 51187 The University of Queensland |+| http://www.csee.uq.edu.au/~leonard/ QLD 4072 AUSTRALIA ~` '~ E2A24DC6446E5779D7AFC41AA04E6401 Curses! - Mojo Jojo |
From: <fo...@mi...> - 2000-07-26 08:51:36
|
I think adding the required methods to ldaplib (the python part) is pretty easy. i'll do if there is enough request. i just committed (well, i am commiting...) some code for schema support. nothing really working but if you want to give it a look, try the schema_test.py script (michael?)... ciao, federico Scavenging the mail folder uncovered David Leonard's letter: > > I was looking at OO models of X.500 directories and came acrosss Perl's > LDAP module and wondered if a compatibility library could be useful to > anyone converting their perl code to python :) :) > > its not finished yet but you can see the gist of the api below. > > any comments? a waste of time? > > The Perl API is documented at > http://developer.netscape.com/tech/directory/perldap_docs/Conn.html > http://developer.netscape.com/tech/directory/perldap_docs/Entry.html > > # python > > '''PerLDAP-like interface to the Python LDAP library > ''' > > class Conn: > def __init__(self, host, port = str(_ldap.PORT), > bind = '', pswd = '', cert = ldap.AUTH_SIMPLE): > self.host, self.port, self.binf = host, port, bind > self._l = _ldap.open(host, int(port)) > self._l.bind_s(bind, pswd, cert) > def search(self, base, scope, pattern): > '''search(base, scope, pattern) -> Entry''' > self._context = self._l.search(scope, pattern) > return self.nextEntry() > def searchURL(self, url): > '''searchURL(url) -> Entry''' > def nextEntry(self): > '''nextEntry() -> Entry''' > ret = self._l.result(self._context) > if ret[0] == _ldap.RES_SEARCH_RESULT: > del self._context > return None > assert ret[0] == _ldap.RES_SEARCH_ENTRY > return Entry(ret[1]) > def update(self, entry): > '''update(entry) -> int''' > def add(self, entry): > '''add(entry) -> int''' > def delete(self, entry): > '''delete(entry) -> int''' > def close(self): > '''close() -> Entry''' > def modifyRDN(self, rdn, dn): > '''modifyRDN(rdn, dn) -> Entry''' > def isURL(self, url): > '''isURL(url) -> int''' > def getLD(self): > '''getLD() -> fd int''' > def getErrorCode(self): > '''getErrorCode() -> int''' > def getErrorString(self): > '''getErrorString() -> string''' > def printError(self): > '''printError()''' > def setRebindProc(self, func): > '''setRebindProc(func)''' > def setDefaultRebindProc(self): > '''setDefaultRebindProc()''' > > class Entry: > def attrModified(self, attr): > '''attrModified(attr)''' > def isModified(self, attr): > '''isModified(attr) -> int''' > def remove(self, attr): > '''remove(attr)''' > def removeValue(self, attr, val): > '''removeValue(attr, val)''' > def addValue(self, attr, val): > '''addValue(attr, val)''' > def hasValue(self, attr, val, ignorecase = 0): > '''hasValue(attr, val [, ignorecase]) -> int''' > def matchValue(self, attr, ignorecase = 0): > '''matchValue(attr [, ignorecase]) -> int''' > def setDN(self, dn): > '''setDN(dn)''' > def getDN(self, dn): > '''getDN(dn) -> string''' > def size(self, attr): > '''size(attr) -> int''' > def exists(self, attr): > '''exists(attr) -> int''' > def printLDIF(self): > '''printLDIF(self)''' > def __getitem__(self, attr): > pass > def __setitem__(self, attr, value): > pass > -- > David Leonard Dav...@cs... > Dept of Comp. Sci. and Elec. Engg _ Room:78-640 Ph:+61 7 336 51187 > The University of Queensland |+| http://www.csee.uq.edu.au/~leonard/ > QLD 4072 AUSTRALIA ~` '~ E2A24DC6446E5779D7AFC41AA04E6401 > > Curses! - Mojo Jojo > > > _______________________________________________ > Python-LDAP-dev mailing list > Pyt...@li... > http://lists.sourceforge.net/mailman/listinfo/python-ldap-dev -- Federico Di Gregorio MIXAD LIVE System Programmer fo...@mi... Debian GNU/Linux Developer & Italian Press Contact fo...@de... 99.99999999999999999999% still isn't 100% but sometimes suffice. -- Me |
From: Michael <mi...@st...> - 2000-07-26 07:48:37
|
David Leonard wrote: > > this worries me. should the PARAM_ERROR, NO_SUCH_OBJECT and > NO_SUCH_ATTRIBUTE > errors not be mapped into python exceptions in the next release? won't this > break existing code?? I'm making heavy use of e.g. catching ldap.NO_SUCH_OBJECT. But all exceptions should be derived from ldap.LDAPError or whatever it's called. Ciao, Michael. |
From: Michael <mi...@st...> - 2000-07-26 07:48:37
|
David Leonard wrote: > > def printLDIF(self): > '''printLDIF(self)''' I can contribute some code for reading and writing LDIF (see gzipped-attachment). Maybe you want to include this module in your software repository. Ciao, Michael. |