Ldap / Python help
Warren Postma
embed at geocities.com
Thu Mar 8 12:43:56 EST 2001
"Pablo Pernot" <ppe at albert.com> wrote in message
news:mailman.984067391.2391.python-list at python.org...
> Hello all,
>
> I'm new in python
>
> I found an ldap module.
>
> Where can I find documentation about ldap/python
>
> my modify instruction won't work => modify_s is waiting for a string (dn)
> and a list (mylist) formed by tuple (mytuple) and this tuple is formed for
3 strings.
>
> So I can't understand the error message about integer.
>
> mytuple=("MOD_REPLACE","sn","test")
> mylist=[mytuple]
>
> >>> l.modify_s(dn,mylist)
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> TypeError: an integer is required
>
>
To convert a tuple to a list, try:
mylist = list(mytuple)
To see what mylist=[mytuple] does, try this:
print repr( [mytuple] )
You see the difference now?
Warren
More information about the Python-list
mailing list