Bruno Desthuilliers wrote:
>
> If you know which attributes are supposed to be multivalued in your
> specific application, then it's time to write a more serious,
> application-specific wrapper.
ldap.schema can be used to find that out.
Ciao, Michael.
--
http://mail.python.org/mailman/listinfo/
Hallvard B Furuseth a écrit :
> Bruno Desthuilliers writes:
>
>>Hallvard B Furuseth a écrit :
>>
else:
# all LDAP attribs are multivalued by default,
# even when the schema says they are monovalued
if len(data) == 1:
return data[0]
Bruno Desthuilliers writes:
>Hallvard B Furuseth a écrit :
>>> else:
>>># all LDAP attribs are multivalued by default,
>>># even when the schema says they are monovalued
>>>if len(data) == 1:
>>> return data[0]
>>>else:
>>> return data[:]
>>
Cruelemort wrote:
> I was wondering the best way to do this? I have installed and used the
> python-ldap libraries and these allow me to access and search the
> server, but the searches always return a horrible nesting of lists,
> tuples and dictionaries, below is an example of returning just one
>
Hallvard B Furuseth a écrit :
> Bruno Desthuilliers writes:
>> class LdapObject(object):
>>(...)
>>def __getattr__(self, name):
>> try:
>>data = self._record[name]
>> except KeyError:
>>raise AttributeError(
>> "object %s has no attribute %s" % (self, name
Bruno Desthuilliers writes:
> class LdapObject(object):
>(...)
>def __getattr__(self, name):
> try:
>data = self._record[name]
> except KeyError:
>raise AttributeError(
> "object %s has no attribute %s" % (self, name)
> )
Note that LDAP attribute
On Feb 1, 11:08 pm, "aspineux" <[EMAIL PROTECTED]> wrote:
> The tree hierarchy is defined by the DN of each object, the types of
> the object is specified by its objectClass.
> Just collect all items (or do it dynamically by tunning the scope and
> the base of your search request)
>
> On 1 fév, 18:
The tree hierarchy is defined by the DN of each object, the types of
the object is specified by its objectClass.
Just collect all items (or do it dynamically by tunning the scope and
the base of your search request)
On 1 fév, 18:22, "Cruelemort" <[EMAIL PROTECTED]> wrote:
> All,
>
> I am hoping
Cruelemort a écrit :
> All,
>
> I am hoping someone would be able to help me with a problem. I have an
> LDAP server running on a linux box, this LDAP server contains a
> telephone list in various groupings, the ldif file of which is -
>
(snip)
>
> I am creating a python client program that will
>
> I was wondering the best way to do this? I have installed and used the
> python-ldap libraries and these allow me to access and search the
> server, but the searches always return a horrible nesting of lists,
> tuples and dictionaries, below is an example of returning just one
> record -
>
>
All,
I am hoping someone would be able to help me with a problem. I have an
LDAP server running on a linux box, this LDAP server contains a
telephone list in various groupings, the ldif file of which is -
dn: dc=example,dc=com
objectClass: top
objectClass: dcObject
objectClass: organization
dc: e
11 matches
Mail list logo