Where's the RES_BIND?
Derrick 'dman' Hudson
dman at dman13.dyndns.org
Tue May 11 23:23:37 CEST 2004
On Tue, May 11, 2004 at 09:06:40PM +0000, Jerry Lee wrote:
| Hello All,
| I just dusted off a QT LDAP browser I had been working on and noticed it
| didn't work.
| A bit of investigation revealed that after:
| import ldap
| >>>c = ldap.open(host='localhost', port=389)
| >>>msg = c.bind("cn=root,o=University of Michigan,
| >>>status,res =c.result(msg,1,5)
| 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
| Any idea where it might be documented what result is returning??
| These docs:
| seem a bit off.
The docs are missing the module constants. One way to see what is
Python 2.3.3 (#2, Feb 24 2004, 09:29:20)
[GCC 3.3.3 (Debian)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ldap
For the code shown above, use :
if status == ldap.RES_BIND :
print "result is BIND"
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
www: http://dman13.dyndns.org/~dman/ jabber: dman at dman13.dyndns.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: Digital signature
More information about the python-ldap