From: Gene Yu <ge...@si...> - 2000-06-23 18:52:50
|
Timothy, The filter you're looking for would look like this: (&(objectclass=person)(sn=Wilson)) You'll have to sort the results in Python. Gene On Fri, 23 Jun 2000, Timothy Wilson wrote: > Hi everyone, > > I'm making good progress implementing Jeffrey Shell's ZLDAP product. I've > got it printing an employee directory using data from our NDS server. I've > read David Leonard's "Python LDAP Module Reference," but there are a couple > things I don't understand. > > 1. What's the syntax for doing more complex filtering of search results in a > "search_s" operation. I saw the reference to BNF in David's docs, and I had > to look up what BNF meant. Unfortunately, I haven't been able to figure out > how to filter my searches for two different attribute variables > simultaneously. Would someone be kind enough to provide a couple concrete > examples. Here's the type of thing I'm looking for: > > Filter for --> objectclass=person AND sn=Wilson > > It looks like once I understand the "and," the "or" and "not" should be > obvious. > > 2. Is there any way to sort the results of the search other than doing a > separate python operation of the search result. (I haven't tried it, but I > assume you could have python sort the results.) > > Thanks in advance for any help. I think I'm going to be using python-ldap > quite a bit. > > -Tim > > -- > Tim Wilson | Visit Sibley online: | Check out: > Henry Sibley HS | http://www.isd197.k12.mn.us/ | http://www.zope.org/ > W. St. Paul, MN | | http://slashdot.org/ > wi...@vi... | <dtml-var pithy_quote> | http://linux.com/ > > > _______________________________________________ > Python-LDAP-dev mailing list > Pyt...@li... > http://lists.sourceforge.net/mailman/listinfo/python-ldap-dev > |