Ńň §ÚęLc@sŤdZddklZedddƒ[ddkZddklZdd gZd eifd „ƒYZdei fd „ƒYZ e d „Z e d jo e ƒndS(svHTML 2.0 parser. See the HTML 2.0 specification: http://www.w3.org/hypertext/WWW/MarkUp/html-spec/html-spec_toc.html i˙˙˙˙(twarnpy3ks1the htmllib module has been removed in Python 3.0t stackleveliN(tAS_ISt HTMLParsertHTMLParseErrorcBseZdZRS(s3Error raised when an HTML document can't be parsed.(t__name__t __module__t__doc__(((s/usr/lib64/python2.6/htmllib.pyRscBs3eZdZddklZdd„Zd„Zd„Zd„Zd„Z d „Z d „Z d „Z d „Z d „Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d „Z!d!„Z"d"„Z#d#„Z$d$„Z%d%„Z&d&„Z'd'„Z(d(„Z)d)„Z*d*„Z+d+„Z,d,„Z-d-„Z.d.„Z/d/„Z0d0„Z1d1„Z2d2„Z3d3„Z4d4„Z5d5„Z6d6„Z7d7„Z8d8„Z9d9„Z:d:„Z;d;„Z<d<„Z=d=„Z>dd>„Z?d?„Z@d@„ZAdA„ZBdB„ZCdC„ZDdD„ZEdE„ZFdF„ZGdG„ZHdH„ZIdI„ZJdJ„ZKdK„ZLdL„ZMdM„ZNdN„ZOdO„ZPdP„ZQdQ„ZRdR„ZSdS„ZTdT„ZUdU„ZVdV„ZWdW„ZXdX„ZYdY„ZZdZ„Z[RS([sĚThis is the basic HTML parser class. It supports all entity names required by the XHTML 1.0 Recommendation. It also defines handlers for all HTML 2.0 and many HTML 3.0 and 3.2 elements. i˙˙˙˙(t entitydefsicCs tii||ƒ||_dS(s•Creates an instance of the HTMLParser class. The formatter parameter is the formatter instance associated with the parser. N(tsgmllibt SGMLParsert__init__t formatter(tselfR tverbose((s/usr/lib64/python2.6/htmllib.pyR "scCst|ƒ‚dS(N(R(R tmessage((s/usr/lib64/python2.6/htmllib.pyterror,scCs\tii|ƒd|_d|_d|_d|_d|_g|_ d|_ g|_ dS(Ni( R R tresettNonetsavedatatisindexttitletbasetanchort anchorlisttnofillt list_stack(R ((s/usr/lib64/python2.6/htmllib.pyR/s       cCsV|idj o|i||_n/|io|ii|ƒn|ii|ƒdS(N(RRRR tadd_literal_datatadd_flowing_data(R tdata((s/usr/lib64/python2.6/htmllib.pyt handle_data?s  cCs d|_dS(sęBegins saving character data in a buffer instead of sending it to the formatter object. Retrieve the stored data via the save_end() method. Use of the save_bgn() / save_end() pair may not be nested. tN(R(R ((s/usr/lib64/python2.6/htmllib.pytsave_bgnJscCs9|i}d|_|ipdi|iƒƒ}n|S(sHEnds buffering character data and returns all data saved since the preceding call to the save_bgn() method. If the nofill flag is false, whitespace is collapsed to single spaces. A call to this method without a preceding call to the save_bgn() method will raise a TypeError exception. t N(RRRtjointsplit(R R((s/usr/lib64/python2.6/htmllib.pytsave_endTs   cCs+||_|io|ii|ƒndS(s}This method is called at the start of an anchor region. The arguments correspond to the attributes of the tag with the same names. The default implementation maintains a list of hyperlinks (defined by the HREF attribute for tags) within the document. The list of hyperlinks is available as the data attribute anchorlist. N(RRtappend(R threftnamettype((s/usr/lib64/python2.6/htmllib.pyt anchor_bgnes  cCs5|io'|idt|iƒƒd|_ndS(sŘThis method is called at the end of an anchor region. The default implementation adds a textual footnote marker using an index into the list of hyperlinks created by the anchor_bgn()method. s[%d]N(RRtlenRR(R ((s/usr/lib64/python2.6/htmllib.pyt anchor_endss cGs|i|ƒdS(s–This method is called to handle images. The default implementation simply passes the alt value to the handle_data() method. N(R(R tsrctalttargs((s/usr/lib64/python2.6/htmllib.pyt handle_image€scCsdS(N((R tattrs((s/usr/lib64/python2.6/htmllib.pyt start_html‹scCsdS(N((R ((s/usr/lib64/python2.6/htmllib.pytend_htmlŒscCsdS(N((R R0((s/usr/lib64/python2.6/htmllib.pyt start_headŽscCsdS(N((R ((s/usr/lib64/python2.6/htmllib.pytend_headscCsdS(N((R R0((s/usr/lib64/python2.6/htmllib.pyt start_body‘scCsdS(N((R ((s/usr/lib64/python2.6/htmllib.pytend_body’scCs|iƒdS(N(R (R R0((s/usr/lib64/python2.6/htmllib.pyt start_title–scCs|iƒ|_dS(N(R$R(R ((s/usr/lib64/python2.6/htmllib.pyt end_title™scCs5x.|D]&\}}|djo ||_qqWdS(NR&(R(R R0tatv((s/usr/lib64/python2.6/htmllib.pytdo_baseœs  cCs d|_dS(Ni(R(R R0((s/usr/lib64/python2.6/htmllib.pyt do_isindexĄscCsdS(N((R R0((s/usr/lib64/python2.6/htmllib.pytdo_link¤scCsdS(N((R R0((s/usr/lib64/python2.6/htmllib.pytdo_meta§scCsdS(N((R R0((s/usr/lib64/python2.6/htmllib.pyt do_nextidŞscCs$|iidƒ|iidƒdS(Nith1i(R@iii(R t end_paragrapht push_font(R R0((s/usr/lib64/python2.6/htmllib.pytstart_h1ąscCs!|iidƒ|iiƒdS(Ni(R RAtpop_font(R ((s/usr/lib64/python2.6/htmllib.pytend_h1ľscCs$|iidƒ|iidƒdS(Nith2i(RFiii(R RARB(R R0((s/usr/lib64/python2.6/htmllib.pytstart_h2šscCs!|iidƒ|iiƒdS(Ni(R RARD(R ((s/usr/lib64/python2.6/htmllib.pytend_h2˝scCs$|iidƒ|iidƒdS(Nith3i(RIiii(R RARB(R R0((s/usr/lib64/python2.6/htmllib.pytstart_h3ÁscCs!|iidƒ|iiƒdS(Ni(R RARD(R ((s/usr/lib64/python2.6/htmllib.pytend_h3ĹscCs$|iidƒ|iidƒdS(Nith4i(RLiii(R RARB(R R0((s/usr/lib64/python2.6/htmllib.pytstart_h4ÉscCs!|iidƒ|iiƒdS(Ni(R RARD(R ((s/usr/lib64/python2.6/htmllib.pytend_h4ÍscCs$|iidƒ|iidƒdS(Nith5i(ROiii(R RARB(R R0((s/usr/lib64/python2.6/htmllib.pytstart_h5ŃscCs!|iidƒ|iiƒdS(Ni(R RARD(R ((s/usr/lib64/python2.6/htmllib.pytend_h5ŐscCs$|iidƒ|iidƒdS(Nith6i(RRiii(R RARB(R R0((s/usr/lib64/python2.6/htmllib.pytstart_h6ŮscCs!|iidƒ|iiƒdS(Ni(R RARD(R ((s/usr/lib64/python2.6/htmllib.pytend_h6ÝscCs|iidƒdS(Ni(R RA(R R0((s/usr/lib64/python2.6/htmllib.pytdo_păscCs@|iidƒ|iitttdfƒ|id|_dS(Ni(R RARBRR(R R0((s/usr/lib64/python2.6/htmllib.pyt start_prećscCs:|iidƒ|iiƒtd|idƒ|_dS(Nii(R RARDtmaxR(R ((s/usr/lib64/python2.6/htmllib.pytend_preës cCs|i|ƒ|idƒdS(Ntxmp(RVt setliteral(R R0((s/usr/lib64/python2.6/htmllib.pyt start_xmpđs cCs|iƒdS(N(RX(R ((s/usr/lib64/python2.6/htmllib.pytend_xmpôscCs|i|ƒ|idƒdS(Ntlisting(RVRZ(R R0((s/usr/lib64/python2.6/htmllib.pyt start_listing÷s cCs|iƒdS(N(RX(R ((s/usr/lib64/python2.6/htmllib.pyt end_listingűscCs0|iidƒ|iitdttfƒdS(Nii(R RARBR(R R0((s/usr/lib64/python2.6/htmllib.pyt start_addressţscCs!|iidƒ|iiƒdS(Ni(R RARD(R ((s/usr/lib64/python2.6/htmllib.pyt end_addressscCs$|iidƒ|iidƒdS(Nit blockquote(R RAt push_margin(R R0((s/usr/lib64/python2.6/htmllib.pytstart_blockquotescCs!|iidƒ|iiƒdS(Ni(R RAt pop_margin(R ((s/usr/lib64/python2.6/htmllib.pytend_blockquote scCsA|ii|i ƒ|iidƒ|iidddgƒdS(Ntult*i(R RARRcR%(R R0((s/usr/lib64/python2.6/htmllib.pytstart_ulscCs=|io|id=n|ii|i ƒ|iiƒdS(Ni˙˙˙˙(RR RARe(R ((s/usr/lib64/python2.6/htmllib.pytend_uls cCsm|iidƒ|io0|id\}}}}|d|d<}n d\}}|ii||ƒdS(Nii˙˙˙˙iiRh(Rhi(R RARtadd_label_data(R R0tdummytlabeltcounterttop((s/usr/lib64/python2.6/htmllib.pytdo_lis   cCs–|ii|i ƒ|iidƒd}xL|D]D\}}|djo+t|ƒdjo|d}n|}q1q1W|iid|dgƒdS(Ntols1.R(it.i(R RARRcR*R%(R R0RmR9R:((s/usr/lib64/python2.6/htmllib.pytstart_ol#s  cCs=|io|id=n|ii|i ƒ|iiƒdS(Ni˙˙˙˙(RR RARe(R ((s/usr/lib64/python2.6/htmllib.pytend_ol-s cCs|i|ƒdS(N(Ri(R R0((s/usr/lib64/python2.6/htmllib.pyt start_menu2scCs|iƒdS(N(Rj(R ((s/usr/lib64/python2.6/htmllib.pytend_menu5scCs|i|ƒdS(N(Ri(R R0((s/usr/lib64/python2.6/htmllib.pyt start_dir8scCs|iƒdS(N(Rj(R ((s/usr/lib64/python2.6/htmllib.pytend_dir;scCs-|iidƒ|iidddgƒdS(NitdlRi(R RARR%(R R0((s/usr/lib64/python2.6/htmllib.pytstart_dl>scCs)|idƒ|io|id=ndS(Nii˙˙˙˙(tddpopR(R ((s/usr/lib64/python2.6/htmllib.pytend_dlBs  cCs|iƒdS(N(R{(R R0((s/usr/lib64/python2.6/htmllib.pytdo_dtFscCs7|iƒ|iidƒ|iidddgƒdS(NtddRi(R{R RcRR%(R R0((s/usr/lib64/python2.6/htmllib.pytdo_ddIs cCsU|ii|ƒ|io7|idddjo|id=|iiƒqQndS(Ni˙˙˙˙iR~(R RARRe(R tbl((s/usr/lib64/python2.6/htmllib.pyR{Ns   cCs|i|ƒdS(N(tstart_i(R R0((s/usr/lib64/python2.6/htmllib.pyt start_citeYscCs|iƒdS(N(tend_i(R ((s/usr/lib64/python2.6/htmllib.pytend_citeZscCs|i|ƒdS(N(tstart_tt(R R0((s/usr/lib64/python2.6/htmllib.pyt start_code\scCs|iƒdS(N(tend_tt(R ((s/usr/lib64/python2.6/htmllib.pytend_code]scCs|i|ƒdS(N(R(R R0((s/usr/lib64/python2.6/htmllib.pytstart_em_scCs|iƒdS(N(Rƒ(R ((s/usr/lib64/python2.6/htmllib.pytend_em`scCs|i|ƒdS(N(R…(R R0((s/usr/lib64/python2.6/htmllib.pyt start_kbdbscCs|iƒdS(N(R‡(R ((s/usr/lib64/python2.6/htmllib.pytend_kbdcscCs|i|ƒdS(N(R…(R R0((s/usr/lib64/python2.6/htmllib.pyt start_sampescCs|iƒdS(N(R‡(R ((s/usr/lib64/python2.6/htmllib.pytend_sampfscCs|i|ƒdS(N(tstart_b(R R0((s/usr/lib64/python2.6/htmllib.pyt start_stronghscCs|iƒdS(N(tend_b(R ((s/usr/lib64/python2.6/htmllib.pyt end_strongiscCs|i|ƒdS(N(R(R R0((s/usr/lib64/python2.6/htmllib.pyt start_varkscCs|iƒdS(N(Rƒ(R ((s/usr/lib64/python2.6/htmllib.pytend_varlscCs |iitdttfƒdS(Ni(R RBR(R R0((s/usr/lib64/python2.6/htmllib.pyRpscCs|iiƒdS(N(R RD(R ((s/usr/lib64/python2.6/htmllib.pyRƒrscCs |iittdtfƒdS(Ni(R RBR(R R0((s/usr/lib64/python2.6/htmllib.pyRuscCs|iiƒdS(N(R RD(R ((s/usr/lib64/python2.6/htmllib.pyR‘wscCs |iitttdfƒdS(Ni(R RBR(R R0((s/usr/lib64/python2.6/htmllib.pyR…zscCs|iiƒdS(N(R RD(R ((s/usr/lib64/python2.6/htmllib.pyR‡|scCs—d}d}d}xk|D]c\}}|iƒ}|djo |}n|djo |}n|djo|iƒ}qqW|i|||ƒdS(NRR&R'R((tstriptlowerR)(R R0R&R'R(tattrnametvalue((s/usr/lib64/python2.6/htmllib.pytstart_as       cCs|iƒdS(N(R+(R ((s/usr/lib64/python2.6/htmllib.pytend_ascCs|iiƒdS(N(R tadd_line_break(R R0((s/usr/lib64/python2.6/htmllib.pytdo_br’scCs|iiƒdS(N(R t add_hor_rule(R R0((s/usr/lib64/python2.6/htmllib.pytdo_hr—sc Cs%d}d}d}d}d}d}xŢ|D]Ö\}} |djo | }n|djo | }n|djo | }n|djo | }n|djo*yt| ƒ}WqĘtj oqĘXn|d jo*yt| ƒ}Wqtj oqXq+q+W|i||||||ƒdS( NRs(image)italignR-tismapR,twidththeight(tintt ValueErrorR/( R R0RŸR-R R,RĄR˘R—R˜((s/usr/lib64/python2.6/htmllib.pytdo_imgœs6             cCs|i|ƒ|iƒdS(N(RVt setnomoretags(R R0((s/usr/lib64/python2.6/htmllib.pyt do_plaintextśs cCsdS(N((R ttagR0((s/usr/lib64/python2.6/htmllib.pytunknown_starttagźscCsdS(N((R R¨((s/usr/lib64/python2.6/htmllib.pytunknown_endtagżs(\RRRthtmlentitydefsRR RRRR R$R)R+R/R1R2R3R4R5R6R7R8R;R<R=R>R?RCRERGRHRJRKRMRNRPRQRSRTRURVRXR[R\R^R_R`RaRdRfRiRjRpRsRtRuRvRwRxRzR|R}RR{R‚R„R†RˆR‰RŠR‹RŒRRŽRR’R“R”RRƒRR‘R…R‡R™RšRœRžRĽR§RŠRŞ(((s/usr/lib64/python2.6/htmllib.pyRs˛                                                                              c CsPddk}ddk}|p|id}n|o|ddj}|o |d=n|o|d}nd}|djo |i}nFyt|dƒ}Wn/tj o#}|GdG|GH|idƒnX|iƒ}||ij o|iƒn|o|i ƒ}n|i |i ƒƒ}t |ƒ}|i |ƒ|iƒdS( Ni˙˙˙˙iis-ss test.htmlt-trt:(tsysR targvtstdintopentIOErrortexittreadtcloset NullFormattertAbstractFormattert DumbWriterRtfeed( R.RŻR tsilenttfiletftmsgRtp((s/usr/lib64/python2.6/htmllib.pyttestĂs2       t__main__(RtwarningsRR R Rt__all__tSGMLParseErrorRR RRRŔR(((s/usr/lib64/python2.6/htmllib.pyts   ˙­ '