�
!`Nc@sJdZddlZddlZddlZdejjfd��YZdS(sTXT-like base class.i����NtTXTBasecBszeZdZdgZd�Zded�Zded�Ze e�Zddd�Z
dd�Ze e�Zd�ZRS( s�Base class for rdata that is like a TXT record
@ivar strings: the text strings
@type strings: list of string
@see: RFC 1035tstringscCsBtt|�j||�t|t�r4|g}n||_dS(N(tsuperRt__init__t
isinstancetstrR(tselftrdclasstrdtypeR((s9/usr/lib64/python2.7/site-packages/dns/rdtypes/txtbase.pyRscKsJd}d}x7|jD],}|d|tjj|�f7}d}qW|S(Nts%s"%s"t (Rtdnstrdatat _escapify(Rtorigint
relativizetkwttxttprefixts((s9/usr/lib64/python2.7/site-packages/dns/rdtypes/txtbase.pytto_text%s
cCs�g}x�|j�j�}|j�r+Pn|j�p@|j�sXtjjd��nt|j �dkr�tjjd��n|j
|j �q t|�dkr�tjj�n||||�S(Nsexpected a stringi�sstring too longi(tgettunescapet
is_eol_or_eoftis_quoted_stringt
is_identifierRt exceptiontSyntaxErrortlentvaluetappendt
UnexpectedEnd(tclsRRttokRRRttoken((s9/usr/lib64/python2.7/site-packages/dns/rdtypes/txtbase.pyt from_text-scCsJxC|jD]8}t|�}t|�}|j|�|j|�q
WdS(N(RRtchrtwrite(RtfiletcompressRRtltbyte((s9/usr/lib64/python2.7/site-packages/dns/rdtypes/txtbase.pytto_wire>s
c
Cs�g}x�|dkr�t||�}|d7}|d8}||krTtjj�n||||!j�} ||7}||8}|j| �q W||||�S(Nii(tordRRt FormErrortunwrapR(
R RRtwiretcurrenttrdlenRRR(R((s9/usr/lib64/python2.7/site-packages/dns/rdtypes/txtbase.pyt from_wireFs
cCst|j|j�S(N(tcmpR(Rtother((s9/usr/lib64/python2.7/site-packages/dns/rdtypes/txtbase.pyt_cmpVsN(
t__name__t
__module__t__doc__t __slots__RtNonetTrueRR#tclassmethodR*R1R4(((s9/usr/lib64/python2.7/site-packages/dns/rdtypes/txtbase.pyRs (R7t
dns.exceptionRt dns.rdatat
dns.tokenizerRtRdataR(((s9/usr/lib64/python2.7/site-packages/dns/rdtypes/txtbase.pyts