From: Derrick 'd. H. <dm...@dm...> - 2004-05-11 21:21:49
|
On Tue, May 11, 2004 at 09:06:40PM +0000, Jerry Lee wrote: | Hello All, |=20 | I just dusted off a QT LDAP browser I had been working on and noticed it= =20 | didn't work. | A bit of investigation revealed that after: | import ldap | >>>c =3D ldap.open(host=3D'localhost', port=3D389) | >>>msg =3D c.bind("cn=3Droot,o=3DUniversity of Michigan,=20 | >>>c=3DUS","secret",ldap.AUTH_SIMPLE) | >>>msg | 1 | >>>status,res =3Dc.result(msg,1,5) | >>>status | 97 |=20 | 97? It used to be 'RES_BIND'..... | Guess things have changed a bit :-) Use the symbolic names provided by the module. Don't use string literals. | Any idea where it might be documented what result is returning?? http://sourceforge.net/mailarchive/forum.php?forum_id=3D4346&max_rows=3D25&= style=3Dflat&viewmonth=3D200403&viewday=3D11 | These docs: | http://python-ldap.sourceforge.net/doc/python-ldap/ldap-objects.html | seem a bit off. The docs are missing the module constants. One way to see what is available : $ python Python 2.3.3 (#2, Feb 24 2004, 09:29:20)=20 [GCC 3.3.3 (Debian)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import ldap >>> dir(ldap) For the code shown above, use : import ldap [...] status,res =3Dc.result(msg,1,5) if status =3D=3D ldap.RES_BIND : print "result is BIND" -D --=20 \begin{humor} Disclaimer: If I receive a message from you, you are agreeing that: 1. I am by definition, "the intended recipient" 2. All information in the email is mine to do with as I see fit and make such financial profit, political mileage, or good joke as it lends itself to. In particular, I may quote it on USENET or the WWW. 3. I may take the contents as representing the views of your company. 4. This overrides any disclaimer or statement of confidentiality that may be included on your message \end{humor} =20 www: http://dman13.dyndns.org/~dman/ jabber: dman@dman13.dyndns.= org |