509318396
Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­
<!DOCTYPE html>
<html>
ó
zfc           @   s©   d  Z  d d l m Z e d d d ƒ[ d d l Z d d l m Z d d	 g Z d	 e j f d
 „  ƒ  YZ d e j	 f d „  ƒ  YZ
 e d „ Z e d k r¥ e ƒ  n  d S(   sv   HTML 2.0 parser.

See the HTML 2.0 specification:
http://www.w3.org/hypertext/WWW/MarkUp/html-spec/html-spec_toc.html
iÿÿÿÿ(   t   warnpy3ks1   the htmllib module has been removed in Python 3.0t
   stackleveli   N(   t   AS_ISt
   HTMLParsert   HTMLParseErrorc           B   s   e  Z d  Z RS(   s3   Error raised when an HTML document can't be parsed.(   t   __name__t
   __module__t   __doc__(    (    (    s   /usr/lib64/python2.7/htmllib.pyR      s   c           B   s3  e  Z d  Z d d l m Z d 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 „  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# „  Z$ d$ „  Z% d% „  Z& d& „  Z' d' „  Z( d( „  Z) d) „  Z* d* „  Z+ d+ „  Z, d, „  Z- d- „  Z. d. „  Z/ d/ „  Z0 d0 „  Z1 d1 „  Z2 d2 „  Z3 d3 „  Z4 d4 „  Z5 d5 „  Z6 d6 „  Z7 d7 „  Z8 d8 „  Z9 d9 „  Z: d: „  Z; d; „  Z< d< „  Z= d= „  Z> d d> „ Z? d? „  Z@ d@ „  ZA dA „  ZB dB „  ZC dC „  ZD dD „  ZE dE „  ZF dF „  ZG dG „  ZH dH „  ZI dI „  ZJ dJ „  ZK dK „  ZL dL „  ZM dM „  ZN dN „  ZO dO „  ZP dP „  ZQ dQ „  ZR dR „  ZS dS „  ZT dT „  ZU dU „  ZV dV „  ZW dW „  ZX dX „  ZY dY „  ZZ dZ „  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
   entitydefsi    c         C   s    t  j j |  | ƒ | |  _ d S(   s•   Creates an instance of the HTMLParser class.

        The formatter parameter is the formatter instance associated with
        the parser.

        N(   t   sgmllibt
   SGMLParsert   __init__t	   formatter(   t   selfR   t   verbose(    (    s   /usr/lib64/python2.7/htmllib.pyR   "   s    c         C   s   t  | ƒ ‚ d  S(   N(   R   (   R   t   message(    (    s   /usr/lib64/python2.7/htmllib.pyt   error,   s    c         C   s\   t  j j |  ƒ d  |  _ d |  _ d  |  _ d  |  _ d  |  _ g  |  _	 d |  _
 g  |  _ d  S(   Ni    (   R	   R
   t   resett   Nonet   savedatat   isindext   titlet   baset   anchort
   anchorlistt   nofillt
   list_stack(   R   (    (    s   /usr/lib64/python2.7/htmllib.pyR   /   s    							c         C   sR   |  j  d  k	 r" |  j  | |  _  n, |  j r> |  j j | ƒ n |  j j | ƒ d  S(   N(   R   R   R   R   t   add_literal_datat   add_flowing_data(   R   t   data(    (    s   /usr/lib64/python2.7/htmllib.pyt   handle_data?   s
    	c         C   s   d |  _  d S(   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.

        t    N(   R   (   R   (    (    s   /usr/lib64/python2.7/htmllib.pyt   save_bgnJ   s    c         C   s7   |  j  } d |  _  |  j s3 d j | j ƒ  ƒ } n  | S(   sH  Ends 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(   R   R   R   t   joint   split(   R   R   (    (    s   /usr/lib64/python2.7/htmllib.pyt   save_endT   s
    				c         C   s)   | |  _  |  j  r% |  j j | ƒ n  d S(   s}  This method is called at the start of an anchor region.

        The arguments correspond to the attributes of the <A> tag with
        the same names.  The default implementation maintains a list of
        hyperlinks (defined by the HREF attribute for <A> tags) within
        the document.  The list of hyperlinks is available as the data
        attribute anchorlist.

        N(   R   R   t   append(   R   t   hreft   namet   type(    (    s   /usr/lib64/python2.7/htmllib.pyt
   anchor_bgne   s    
		c         C   s3   |  j  r/ |  j d t |  j ƒ ƒ d |  _  n  d S(   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(   R   R   t   lenR   R   (   R   (    (    s   /usr/lib64/python2.7/htmllib.pyt
   anchor_ends   s    	c         G   s   |  j  | ƒ d S(   s–   This method is called to handle images.

        The default implementation simply passes the alt value to the
        handle_data() method.

        N(   R   (   R   t   srct   altt   args(    (    s   /usr/lib64/python2.7/htmllib.pyt   handle_image€   s    c         C   s   d  S(   N(    (   R   t   attrs(    (    s   /usr/lib64/python2.7/htmllib.pyt
   start_html‹   R   c         C   s   d  S(   N(    (   R   (    (    s   /usr/lib64/python2.7/htmllib.pyt   end_htmlŒ   R   c         C   s   d  S(   N(    (   R   R0   (    (    s   /usr/lib64/python2.7/htmllib.pyt
   start_headŽ   R   c         C   s   d  S(   N(    (   R   (    (    s   /usr/lib64/python2.7/htmllib.pyt   end_head�   R   c         C   s   d  S(   N(    (   R   R0   (    (    s   /usr/lib64/python2.7/htmllib.pyt
   start_body‘   R   c         C   s   d  S(   N(    (   R   (    (    s   /usr/lib64/python2.7/htmllib.pyt   end_body’   R   c         C   s   |  j  ƒ  d  S(   N(   R    (   R   R0   (    (    s   /usr/lib64/python2.7/htmllib.pyt   start_title–   s    c         C   s   |  j  ƒ  |  _ d  S(   N(   R$   R   (   R   (    (    s   /usr/lib64/python2.7/htmllib.pyt	   end_title™   s    c         C   s3   x, | D]$ \ } } | d k r | |  _  q q Wd  S(   NR&   (   R   (   R   R0   t   at   v(    (    s   /usr/lib64/python2.7/htmllib.pyt   do_baseœ   s    c         C   s   d |  _  d  S(   Ni   (   R   (   R   R0   (    (    s   /usr/lib64/python2.7/htmllib.pyt
   do_isindex¡   s    c         C   s   d  S(   N(    (   R   R0   (    (    s   /usr/lib64/python2.7/htmllib.pyt   do_link¤   s    c         C   s   d  S(   N(    (   R   R0   (    (    s   /usr/lib64/python2.7/htmllib.pyt   do_meta§   s    c         C   s   d  S(   N(    (   R   R0   (    (    s   /usr/lib64/python2.7/htmllib.pyt	   do_nextidª   s    c         C   s$   |  j  j d ƒ |  j  j d ƒ d  S(   Ni   t   h1i    (   R@   i    i   i    (   R   t   end_paragrapht	   push_font(   R   R0   (    (    s   /usr/lib64/python2.7/htmllib.pyt   start_h1±   s    c         C   s!   |  j  j d ƒ |  j  j ƒ  d  S(   Ni   (   R   RA   t   pop_font(   R   (    (    s   /usr/lib64/python2.7/htmllib.pyt   end_h1µ   s    c         C   s$   |  j  j d ƒ |  j  j d ƒ d  S(   Ni   t   h2i    (   RF   i    i   i    (   R   RA   RB   (   R   R0   (    (    s   /usr/lib64/python2.7/htmllib.pyt   start_h2¹   s    c         C   s!   |  j  j d ƒ |  j  j ƒ  d  S(   Ni   (   R   RA   RD   (   R   (    (    s   /usr/lib64/python2.7/htmllib.pyt   end_h2½   s    c         C   s$   |  j  j d ƒ |  j  j d ƒ d  S(   Ni   t   h3i    (   RI   i    i   i    (   R   RA   RB   (   R   R0   (    (    s   /usr/lib64/python2.7/htmllib.pyt   start_h3Á   s    c         C   s!   |  j  j d ƒ |  j  j ƒ  d  S(   Ni   (   R   RA   RD   (   R   (    (    s   /usr/lib64/python2.7/htmllib.pyt   end_h3Å   s    c         C   s$   |  j  j d ƒ |  j  j d ƒ d  S(   Ni   t   h4i    (   RL   i    i   i    (   R   RA   RB   (   R   R0   (    (    s   /usr/lib64/python2.7/htmllib.pyt   start_h4É   s    c         C   s!   |  j  j d ƒ |  j  j ƒ  d  S(   Ni   (   R   RA   RD   (   R   (    (    s   /usr/lib64/python2.7/htmllib.pyt   end_h4Í   s    c         C   s$   |  j  j d ƒ |  j  j d ƒ d  S(   Ni   t   h5i    (   RO   i    i   i    (   R   RA   RB   (   R   R0   (    (    s   /usr/lib64/python2.7/htmllib.pyt   start_h5Ñ   s    c         C   s!   |  j  j d ƒ |  j  j ƒ  d  S(   Ni   (   R   RA   RD   (   R   (    (    s   /usr/lib64/python2.7/htmllib.pyt   end_h5Õ   s    c         C   s$   |  j  j d ƒ |  j  j d ƒ d  S(   Ni   t   h6i    (   RR   i    i   i    (   R   RA   RB   (   R   R0   (    (    s   /usr/lib64/python2.7/htmllib.pyt   start_h6Ù   s    c         C   s!   |  j  j d ƒ |  j  j ƒ  d  S(   Ni   (   R   RA   RD   (   R   (    (    s   /usr/lib64/python2.7/htmllib.pyt   end_h6Ý   s    c         C   s   |  j  j d ƒ d  S(   Ni   (   R   RA   (   R   R0   (    (    s   /usr/lib64/python2.7/htmllib.pyt   do_pã   s    c         C   s@   |  j  j d ƒ |  j  j t t t d f ƒ |  j d |  _ d  S(   Ni   (   R   RA   RB   R   R   (   R   R0   (    (    s   /usr/lib64/python2.7/htmllib.pyt	   start_preæ   s    c         C   s:   |  j  j d ƒ |  j  j ƒ  t d |  j d ƒ |  _ d  S(   Ni   i    (   R   RA   RD   t   maxR   (   R   (    (    s   /usr/lib64/python2.7/htmllib.pyt   end_preë   s    c         C   s   |  j  | ƒ |  j d ƒ d  S(   Nt   xmp(   RV   t
   setliteral(   R   R0   (    (    s   /usr/lib64/python2.7/htmllib.pyt	   start_xmpð   s    c         C   s   |  j  ƒ  d  S(   N(   RX   (   R   (    (    s   /usr/lib64/python2.7/htmllib.pyt   end_xmpô   s    c         C   s   |  j  | ƒ |  j d ƒ d  S(   Nt   listing(   RV   RZ   (   R   R0   (    (    s   /usr/lib64/python2.7/htmllib.pyt   start_listing÷   s    c         C   s   |  j  ƒ  d  S(   N(   RX   (   R   (    (    s   /usr/lib64/python2.7/htmllib.pyt   end_listingû   s    c         C   s0   |  j  j d ƒ |  j  j t d t t f ƒ d  S(   Ni    i   (   R   RA   RB   R   (   R   R0   (    (    s   /usr/lib64/python2.7/htmllib.pyt   start_addressþ   s    c         C   s!   |  j  j d ƒ |  j  j ƒ  d  S(   Ni    (   R   RA   RD   (   R   (    (    s   /usr/lib64/python2.7/htmllib.pyt   end_address  s    c         C   s$   |  j  j d ƒ |  j  j d ƒ d  S(   Ni   t
   blockquote(   R   RA   t   push_margin(   R   R0   (    (    s   /usr/lib64/python2.7/htmllib.pyt   start_blockquote  s    c         C   s!   |  j  j d ƒ |  j  j ƒ  d  S(   Ni   (   R   RA   t
   pop_margin(   R   (    (    s   /usr/lib64/python2.7/htmllib.pyt   end_blockquote
  s    c         C   sA   |  j  j |  j ƒ |  j  j d ƒ |  j j d d d g ƒ d  S(   Nt   ult   *i    (   R   RA   R   Rc   R%   (   R   R0   (    (    s   /usr/lib64/python2.7/htmllib.pyt   start_ul  s    c         C   s;   |  j  r |  j  d =n  |  j j |  j  ƒ |  j j ƒ  d  S(   Niÿÿÿÿ(   R   R   RA   Re   (   R   (    (    s   /usr/lib64/python2.7/htmllib.pyt   end_ul  s    	 c         C   sk   |  j  j d ƒ |  j rH |  j d \ } } } } | d | d <} n d \ } } |  j  j | | ƒ d  S(   Ni    iÿÿÿÿi   i   Rh   (   Rh   i    (   R   RA   R   t   add_label_data(   R   R0   t   dummyt   labelt   countert   top(    (    s   /usr/lib64/python2.7/htmllib.pyt   do_li  s    	c         C   s’   |  j  j |  j ƒ |  j  j d ƒ d } xH | D]@ \ } } | d k r1 t | ƒ d k rh | d } n  | } q1 q1 W|  j j d | d g ƒ d  S(   Nt   ols   1.R(   i   t   .i    (   R   RA   R   Rc   R*   R%   (   R   R0   Rm   R9   R:   (    (    s   /usr/lib64/python2.7/htmllib.pyt   start_ol#  s     c         C   s;   |  j  r |  j  d =n  |  j j |  j  ƒ |  j j ƒ  d  S(   Niÿÿÿÿ(   R   R   RA   Re   (   R   (    (    s   /usr/lib64/python2.7/htmllib.pyt   end_ol-  s    	 c         C   s   |  j  | ƒ d  S(   N(   Ri   (   R   R0   (    (    s   /usr/lib64/python2.7/htmllib.pyt
   start_menu2  s    c         C   s   |  j  ƒ  d  S(   N(   Rj   (   R   (    (    s   /usr/lib64/python2.7/htmllib.pyt   end_menu5  s    c         C   s   |  j  | ƒ d  S(   N(   Ri   (   R   R0   (    (    s   /usr/lib64/python2.7/htmllib.pyt	   start_dir8  s    c         C   s   |  j  ƒ  d  S(   N(   Rj   (   R   (    (    s   /usr/lib64/python2.7/htmllib.pyt   end_dir;  s    c         C   s-   |  j  j d ƒ |  j j d d d g ƒ d  S(   Ni   t   dlR   i    (   R   RA   R   R%   (   R   R0   (    (    s   /usr/lib64/python2.7/htmllib.pyt   start_dl>  s    c         C   s'   |  j  d ƒ |  j r# |  j d =n  d  S(   Ni   iÿÿÿÿ(   t   ddpopR   (   R   (    (    s   /usr/lib64/python2.7/htmllib.pyt   end_dlB  s    	 c         C   s   |  j  ƒ  d  S(   N(   R{   (   R   R0   (    (    s   /usr/lib64/python2.7/htmllib.pyt   do_dtF  s    c         C   s7   |  j  ƒ  |  j j d ƒ |  j j d d d g ƒ d  S(   Nt   ddR   i    (   R{   R   Rc   R   R%   (   R   R0   (    (    s   /usr/lib64/python2.7/htmllib.pyt   do_ddI  s    
c         C   sQ   |  j  j | ƒ |  j rM |  j d d d k rM |  j d =|  j  j ƒ  qM n  d  S(   Niÿÿÿÿi    R~   (   R   RA   R   Re   (   R   t   bl(    (    s   /usr/lib64/python2.7/htmllib.pyR{   N  s
    	
c         C   s   |  j  | ƒ d  S(   N(   t   start_i(   R   R0   (    (    s   /usr/lib64/python2.7/htmllib.pyt
   start_citeY  R   c         C   s   |  j  ƒ  d  S(   N(   t   end_i(   R   (    (    s   /usr/lib64/python2.7/htmllib.pyt   end_citeZ  R   c         C   s   |  j  | ƒ d  S(   N(   t   start_tt(   R   R0   (    (    s   /usr/lib64/python2.7/htmllib.pyt
   start_code\  R   c         C   s   |  j  ƒ  d  S(   N(   t   end_tt(   R   (    (    s   /usr/lib64/python2.7/htmllib.pyt   end_code]  R   c         C   s   |  j  | ƒ d  S(   N(   R�   (   R   R0   (    (    s   /usr/lib64/python2.7/htmllib.pyt   start_em_  R   c         C   s   |  j  ƒ  d  S(   N(   Rƒ   (   R   (    (    s   /usr/lib64/python2.7/htmllib.pyt   end_em`  R   c         C   s   |  j  | ƒ d  S(   N(   R…   (   R   R0   (    (    s   /usr/lib64/python2.7/htmllib.pyt	   start_kbdb  R   c         C   s   |  j  ƒ  d  S(   N(   R‡   (   R   (    (    s   /usr/lib64/python2.7/htmllib.pyt   end_kbdc  R   c         C   s   |  j  | ƒ d  S(   N(   R…   (   R   R0   (    (    s   /usr/lib64/python2.7/htmllib.pyt
   start_sampe  R   c         C   s   |  j  ƒ  d  S(   N(   R‡   (   R   (    (    s   /usr/lib64/python2.7/htmllib.pyt   end_sampf  R   c         C   s   |  j  | ƒ d  S(   N(   t   start_b(   R   R0   (    (    s   /usr/lib64/python2.7/htmllib.pyt   start_strongh  R   c         C   s   |  j  ƒ  d  S(   N(   t   end_b(   R   (    (    s   /usr/lib64/python2.7/htmllib.pyt
   end_strongi  R   c         C   s   |  j  | ƒ d  S(   N(   R�   (   R   R0   (    (    s   /usr/lib64/python2.7/htmllib.pyt	   start_vark  R   c         C   s   |  j  ƒ  d  S(   N(   Rƒ   (   R   (    (    s   /usr/lib64/python2.7/htmllib.pyt   end_varl  R   c         C   s    |  j  j t d t t f ƒ d  S(   Ni   (   R   RB   R   (   R   R0   (    (    s   /usr/lib64/python2.7/htmllib.pyR�   p  s    c         C   s   |  j  j ƒ  d  S(   N(   R   RD   (   R   (    (    s   /usr/lib64/python2.7/htmllib.pyRƒ   r  s    c         C   s    |  j  j t t d t f ƒ d  S(   Ni   (   R   RB   R   (   R   R0   (    (    s   /usr/lib64/python2.7/htmllib.pyR�   u  s    c         C   s   |  j  j ƒ  d  S(   N(   R   RD   (   R   (    (    s   /usr/lib64/python2.7/htmllib.pyR‘   w  s    c         C   s    |  j  j t t t d f ƒ d  S(   Ni   (   R   RB   R   (   R   R0   (    (    s   /usr/lib64/python2.7/htmllib.pyR…   z  s    c         C   s   |  j  j ƒ  d  S(   N(   R   RD   (   R   (    (    s   /usr/lib64/python2.7/htmllib.pyR‡   |  s    c         C   s‘   d } d } d } xe | D]] \ } } | j  ƒ  } | d k rF | } n  | d k r[ | } n  | d k r | j ƒ  } q q W|  j | | | ƒ d  S(   NR   R&   R'   R(   (   t   stript   lowerR)   (   R   R0   R&   R'   R(   t   attrnamet   value(    (    s   /usr/lib64/python2.7/htmllib.pyt   start_a  s    		c         C   s   |  j  ƒ  d  S(   N(   R+   (   R   (    (    s   /usr/lib64/python2.7/htmllib.pyt   end_a�  s    c         C   s   |  j  j ƒ  d  S(   N(   R   t   add_line_break(   R   R0   (    (    s   /usr/lib64/python2.7/htmllib.pyt   do_br’  s    c         C   s   |  j  j ƒ  d  S(   N(   R   t   add_hor_rule(   R   R0   (    (    s   /usr/lib64/python2.7/htmllib.pyt   do_hr—  s    c   
      C   s  d } d } d } d } d } d } xÎ | D]Æ \ } }	 | d k rL |	 } n  | d k ra |	 } n  | d k rv |	 } n  | d k r‹ |	 } n  | d k r¾ y t  |	 ƒ } Wq¾ t k
 rº q¾ Xn  | d	 k r+ y t  |	 ƒ } Wqñ t k
 rí qñ Xq+ q+ W|  j | | | | | | ƒ d  S(
   NR   s   (image)i    t   alignR-   t   ismapR,   t   widtht   height(   t   intt
   ValueErrorR/   (
   R   R0   RŸ   R-   R    R,   R¡   R¢   R—   R˜   (    (    s   /usr/lib64/python2.7/htmllib.pyt   do_imgœ  s4    				    c         C   s   |  j  | ƒ |  j ƒ  d  S(   N(   RV   t   setnomoretags(   R   R0   (    (    s   /usr/lib64/python2.7/htmllib.pyt   do_plaintext¶  s    c         C   s   d  S(   N(    (   R   t   tagR0   (    (    s   /usr/lib64/python2.7/htmllib.pyt   unknown_starttag¼  s    c         C   s   d  S(   N(    (   R   R¨   (    (    s   /usr/lib64/python2.7/htmllib.pyt   unknown_endtag¿  s    (\   R   R   R   t   htmlentitydefsR   R   R   R   R   R    R$   R)   R+   R/   R1   R2   R3   R4   R5   R6   R7   R8   R;   R<   R=   R>   R?   RC   RE   RG   RH   RJ   RK   RM   RN   RP   RQ   RS   RT   RU   RV   RX   R[   R\   R^   R_   R`   Ra   Rd   Rf   Ri   Rj   Rp   Rs   Rt   Ru   Rv   Rw   Rx   Rz   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ž   R¥   R§   R©   Rª   (    (    (    s   /usr/lib64/python2.7/htmllib.pyR      s²   
				
																																													
																																				c   	      C   sA  d d  l  } d d  l } |  s. | j d }  n  |  oA |  d d k } | rT |  d =n  |  rg |  d } n d } | d k r… | j } nC y t | d ƒ } Wn- t k
 rÇ } | Gd G| GH| j d ƒ n X| j ƒ  } | | j k	 rð | j ƒ  n  | r| j	 ƒ  } n | j
 | j ƒ  ƒ } t | ƒ } | j | ƒ | j ƒ  d  S(	   Niÿÿÿÿi   i    s   -ss	   test.htmlt   -t   rt   :(   t   sysR   t   argvt   stdint   opent   IOErrort   exitt   readt   closet   NullFormattert   AbstractFormattert
   DumbWriterR   t   feed(	   R.   R¯   R   t   silentt   filet   ft   msgR   t   p(    (    s   /usr/lib64/python2.7/htmllib.pyt   testÃ  s2    
t   __main__(   R   t   warningsR    R	   R   R   t   __all__t   SGMLParseErrorR   R
   R   R   RÀ   R   (    (    (    s   /usr/lib64/python2.7/htmllib.pyt   <module>   s   	ÿ ­'