File: //usr/local/ssl/local/ssl/lib/python2.4/site-packages/dns/e164.pyc
mò
‹Oc @ s^ d Z d k Z d k Z d k Z e i i d ƒ Z e d „ Z e e d „ Z
d d „ Z d S( s‚ DNS E.164 helpers
@var public_enum_domain: The DNS public ENUM domain, e164.arpa.
@type public_enum_domain: dns.name.Name object
Ns
e164.arpa.c C s[ g } | D] } | i ƒ o | | q q ~ } | i ƒ t i i d i | ƒ d | ƒS( su Convert an E.164 number in textual form into a Name object whose
value is the ENUM domain name for that number.
@param text: an E.164 number in textual form.
@type text: str
@param origin: The domain in which the number should be constructed.
The default is e164.arpa.
@type origin: dns.name.Name object or None
@rtype: dns.name.Name object
t .t originN( t _[1]t textt dt isdigitt partst reverset dnst namet from_textt joinR ( R R R R R ( ( t, /usr/lib/python2.4/site-packages/dns/e164.pyt from_e164 s 2
c C sÌ | d j o | i | ƒ } n g } | i D]1 } | i ƒ o t | ƒ d j o | | q. q. ~ } t | ƒ t | i ƒ j o t
i i d ƒ ‚ n | i
ƒ d i | ƒ } | o d | } n | S( s¨ Convert an ENUM domain name into an E.164 number.
@param name: the ENUM domain name.
@type name: dns.name.Name object.
@param origin: A domain containing the ENUM domain name. The
name is relativized to this domain before being converted to text.
@type origin: dns.name.Name object or None
@param want_plus_prefix: if True, add a '+' to the beginning of the
returned number.
@rtype: str
i s$ non-digit labels in ENUM domain namet t +N( R t NoneR t
relativizeR t labelsR R t lent dlabelsR t exceptiont SyntaxErrorR R R t want_plus_prefix( R R R R R R R ( ( R t to_e164* s
H
c C s² | d j o t i i ƒ } n x | D]w } t | t t f ƒ o t i i
| ƒ } n t i i | | ƒ } y | i | d ƒ SWq' t i i j
o q' Xq' Wt i i ‚ d S( s‘ Look for NAPTR RRs for the specified number in the specified domains.
e.g. lookup('16505551212', ['e164.dnspython.org.', 'e164.arpa.'])
t NAPTRN( t resolverR R t get_default_resolvert domainst domaint
isinstancet strt unicodeR R
t e164R
t numbert qnamet queryt NXDOMAIN( R"