관리-도구
편집 파일: txtbase.pyc
� !`Nc @ sJ d Z d d l Z d d l Z d d l Z d e j j f d � � YZ d S( s TXT-like base class.i����Nt TXTBasec B sz e Z d Z d g Z d � Z d e d � Z d e d � Z e e � Z d d d � Z d d � Z e e � Z d � Z RS( s� Base class for rdata that is like a TXT record @ivar strings: the text strings @type strings: list of string @see: RFC 1035t stringsc C sB t t | � j | | � t | t � r4 | g } n | | _ d S( N( t superR t __init__t isinstancet strR ( t selft rdclasst rdtypeR ( ( s9 /usr/lib64/python2.7/site-packages/dns/rdtypes/txtbase.pyR s c K sJ d } d } x7 | j D], } | d | t j j | � f 7} d } q W| S( Nt s %s"%s"t ( R t dnst rdatat _escapify( R t origint relativizet kwt txtt prefixt s( ( s9 /usr/lib64/python2.7/site-packages/dns/rdtypes/txtbase.pyt to_text% s c C s� g } x� | j � j � } | j � r+ Pn | j � p@ | j � sX t j j d � � n t | j � d k r� t j j d � � n | j | j � q Wt | � d k r� t j j � n | | | | � S( Ns expected a stringi� s string too longi ( t gett unescapet is_eol_or_eoft is_quoted_stringt is_identifierR t exceptiont SyntaxErrort lent valuet appendt UnexpectedEnd( t clsR R t tokR R R t token( ( s9 /usr/lib64/python2.7/site-packages/dns/rdtypes/txtbase.pyt from_text- s c C s\ xU | j D]J } t | � } | d k s. t � t | � } | j | � | j | � q Wd S( Ni ( R R t AssertionErrort chrt write( R t filet compressR R t lt byte( ( s9 /usr/lib64/python2.7/site-packages/dns/rdtypes/txtbase.pyt to_wire>