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,
| >>>c=US","secret",ldap.AUTH_SIMPLE)
| >>>msg
| 1
| >>>status,res =c.result(msg,1,5)
| >>>status
| 97
|
| 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=4346&max_rows=25&style=flat&viewmonth=200403&viewday=11
| 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)
[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 =c.result(msg,1,5)
if status == ldap.RES_BIND :
print "result is BIND"
-D
--
\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}
www: http://dman13.dyndns.org/~dman/ jabber: dman at dman13.dyndns.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20040511/ad6255ce/attachment.pgp>
More information about the python-ldap
mailing list