Michael Ströder wrote: > Thorsten Kampe wrote: >> [4]>>> connection.search_s('ou=system', ldap.SCOPE_SUBTREE, >> filterstr='(cn=*)', attrlist = ['cn'], attrsonly = True) > > Just a wild guess: Could you please try again with attrsonly=1. Note > that this API has its roots in Python 1.x times where there was no > Boolean True/False type. It would be worth handling that gracefully though.
Which versions of Python and python-ldap are you using? I've tested it with my local OpenLDAP server with Python 2.6 and python-ldap 2.3.8 built against OpenLDAP RE24 libs: >>> l.search_ext_s('dc=stroeder,dc=de',0,'(objectclass=*)',attrsonly=0) [('dc=stroeder,dc=de', {'description': ['Wurzeleintrag f\xc3\xbcr lokales Adressbuch von Michael Str\xc3\xb6der'], 'labeledURI': ['http://www.stroeder.de', 'http://www.block-floete.de'], 'objectClass': ['domain', 'labeledURIObject', 'domainRelatedObject'], 'associatedDomain': ['stroeder.com'], 'dc': ['stroeder'], 'o': ['Michaels'], 'seeAlso': ['dc=stroeder,dc=com']})] >>> l.search_ext_s('dc=stroeder,dc=de',0,'(objectclass=*)',attrsonly=1) [('dc=stroeder,dc=de', {'description': [], 'labeledURI': [], 'objectClass': [], 'associatedDomain': [], 'dc': [], 'o': [], 'seeAlso': []})] >>> l.search_ext_s('dc=stroeder,dc=de',0,'(objectclass=*)',attrsonly=True) [('dc=stroeder,dc=de', {'description': [], 'labeledURI': [], 'objectClass': [], 'associatedDomain': [], 'dc': [], 'o': [], 'seeAlso': []})] So it seems that it simply works. Ciao, Michael. ------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge _______________________________________________ Python-LDAP-dev mailing list Python-LDAP-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/python-ldap-dev