File: //usr/lib/python2.7/site-packages/dns/ipv4.pyo
�
�b�Wc @ sD d Z d d l Z d d l Z d d l m Z d � Z d � Z d S( s IPv4 helper functions.i����Ni ( t binary_typec C si t | � d k r! t j j � n t | t � s? t | � } n d | d | d | d | d f j � S( s� Convert an IPv4 address in network form to text form.
@param address: The IPv4 address
@type address: string
@returns: string
i u %u.%u.%u.%ui i i i ( t lent dnst exceptiont SyntaxErrort
isinstancet bytearrayt encode( t address( ( s, /usr/lib/python2.7/site-packages/dns/ipv4.pyt inet_ntoa s c C s� t | t � s | j � } n | j d � } t | � d k rN t j j � n xZ | D]R } | j � sv t j j � n t | � d k rU | d d k rU t j j � qU qU Wy3 g | D] } t | � ^ q� } t
j d | � SWn t j j � n Xd S( s� Convert an IPv4 address in text form to network form.
@param text: The IPv4 address
@type text: string
@returns: string
t .i i i t 0t BBBBN( R R R t splitR R R R t isdigitt intt structt pack( t textt partst partt bytes( ( s, /usr/lib/python2.7/site-packages/dns/ipv4.pyt inet_aton% s
"( t __doc__R t
dns.exceptionR t _compatR R R ( ( ( s, /usr/lib/python2.7/site-packages/dns/ipv4.pyt <module> s