| Server IP : 182.53.201.61 / Your IP : 216.73.217.175 Web Server : Apache/2.2.15 (Fedora) System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686 User : apache ( 48) PHP Version : 5.3.3 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/lib/python2.6/site-packages/ldap/ |
Upload File : |
Ñò •òÔGc @ sd d Z d Z d d k Z d d k Z d „ Z d d „ Z d „ Z d d d „ Z d d d „ Z d S( s× dn.py - misc stuff for handling distinguished names (see RFC 4514) See http://python-ldap.sourceforge.net for details. \$Id: dn.py,v 1.7 2008/03/10 08:34:29 stroeder Exp $ Compability: - Tested with Python 2.0+ s 0.2.0iÿÿÿÿNc C s | o| i d d ƒ } | i d d ƒ } | i d d ƒ } | i d d ƒ } | i d d ƒ } | i d d ƒ } | i d d ƒ } | i d d ƒ } | i d d ƒ } | d d j p | d d j o d i d | f ƒ } n | d d j o d i | d d f ƒ } qn | S( sa Escape all DN special characters found in s with a back-slash (see RFC 4514, section 2.4) s \s \\t ,s \,t +s \+t "s \"t <s \<t >s \>t ;s \;t =s \=t s \ i t #t t iÿÿÿÿs \ ( t replacet join( t s( ( s+ /usr/lib/python2.6/site-packages/ldap/dn.pyt escape_dn_chars s "!i c C s% | p g St i i t i | | ƒ S( sÍ This function takes a DN as string as parameter and returns a decomposed DN. It's the inverse to dn2str(). flags describes the format of the dn See also the OpenLDAP man-page ldap_str2dn(3) ( t ldapt functionst _ldap_function_callt _ldapt str2dn( t dnt flags( ( s+ /usr/lib/python2.6/site-packages/ldap/dn.pyR * s c C sq d i g } | D]V } | d i g } | D]2 \ } } } | d i | t | p d ƒ f ƒ q+ ~ ƒ q ~ ƒ S( s¸ This function takes a decomposed DN as parameter and returns a single string. It's the inverse to str2dn() but will always return a DN in LDAPv3 format compliant to RFC 4514. R R R R ( R R ( R t _[1]t rdnt _[2]t atypet avaluet dummy( ( s+ /usr/lib/python2.6/site-packages/ldap/dn.pyt dn2str8 s c C sÞ | p g St | | ƒ } g } x¶ | D]® } | oK | i d i g } | D]# \ } } } | t | p d ƒ qL ~ ƒ ƒ q( | i d i g } | D]2 \ } } } | d i | t | p d ƒ f ƒ q— ~ ƒ ƒ q( W| S( sô explode_dn(dn [, notypes=0]) -> list This function takes a DN and breaks it up into its component parts. The notypes parameter is used to specify that only the component's attribute values be returned and not the attribute types. R R R ( R t appendR R ( R t notypesR t dn_decompt rdn_listR R R R R R ( ( s+ /usr/lib/python2.6/site-packages/ldap/dn.pyt explode_dnE s 8Gc C sž | p g St | | ƒ d } | o0 g } | D] \ } } } | | p d q1 ~ Sg } | D]2 \ } } } | d i | t | p d ƒ f ƒ qa ~ Sd S( s explode_rdn(rdn [, notypes=0]) -> list This function takes a RDN and breaks it up into its component parts if it is a multi-valued RDN. The notypes parameter is used to specify that only the component's attribute values be returned and not the attribute types. i R R N( R R R ( R R R t rdn_decompR R R R R ( ( s+ /usr/lib/python2.6/site-packages/ldap/dn.pyt explode_rdn_ s 0( t __doc__t __version__R t ldap.functionsR R R R R! R# ( ( ( s+ /usr/lib/python2.6/site-packages/ldap/dn.pyt <module> s