+
    Dfj*                         R t ^ RIt^ RIt^ RIHt ^ RIHt ^RIHt  ! R R4      t	 ! R R4      t
 ! R	 R
]
4      t]
3R ltR t]R8X  d
   ]! 4        R# R# )z"
HTML rendering of Python source.
N)escape)List)reflectc                   F   a  ] tR t^t o Rt^ ^utt^ ;ttRt	R t
R tRtV tR# )TokenPrinterzM
Format a stream of tokens and intermediate whitespace, for pretty-printing.
utf-8c                    Wn         R# )z:
@param writer: A file-like object, opened in bytes mode.
N)writer)selfr	   s   &&9/usr/lib/python3/dist-packages/twisted/python/htmlizer.py__init__TokenPrinter.__init__   s	         c                   \        \        R 4      '       d   V\        P                  8X  d	   W n        R# \	        V\
        4      '       g   VP                  V P                  4      pVw  rgVw  rV P                  V8  d8   V P                  RW`P                  ,
          ,          4       V^ uV n        V n	        V P                  RWpP                  ,
          ,          4       V P                  '       d   Rp^V n        MV\        P                  8X  d8   \        P                  ! V4      '       d   RpMMV P                  '       d   RpM8RpM5\        P                  P!                  V4      pVf   Q hVP#                  4       pV P                  W!4       Wn	        V ;P                  VP%                  R4      ,          un        V P                  V8w  d   ^ V n	        VR	9   V n
        VR8X  d
   ^ V n        R# R# )
ENCODINGN   
    
identifierkeyword	parametervariable   :)s   defs   class)hasattrtokenizer   encoding
isinstancebytesencodecurrentLiner	   
currentCollastIdentifier
parametersNAMEr   	iskeywordtok_namegetlowercount)
r
   typetokensCoordinateseCoordinateslinesrowscolerowecols
   &&&&&&    r   
printtokenTokenPrinter.printtoken    s}   8Z((TX5F5F-F!M%''LL/E##d"KK(8(8!89:04a-DdoDD??234DDOX]]"  '' ???&D%D$$((.D###::<DE EKK..t#DO#'99D=DO r   )r   r   r   r    r!   r	   N)__name__
__module____qualname____firstlineno____doc__r   r   r    r!   r   r   r1   __static_attributes____classdictcell____classdict__s   @r   r   r      s6       J"##NZH$  $ r   r   c                   D   a  ] tR t^Gt o Rt. tR tRR ltV 3R ltRt	V t
R# )
HTMLWriterza
Write the stream of tokens and whitespace from L{TokenPrinter}, formating
tokens as HTML spans.
c                f    Wn         . p\        P                  ! V P                  R V4       W n        R# )noSpanN)r	   r   accumulateClassList	__class__r?   )r
   r	   r?   s   && r   r   HTMLWriter.__init__O   s'    ##DNNHfEr   Nc                R   \        V\        4      '       d   VP                  R 4      p\        V4      pVP	                  R 4      pVe   W P
                  9   d   V P                  V4       R# V P                  RVP	                  R 4      ,           R,           V,           R,           4       R# )r   Ns   <span class="py-src-s   ">s   </span>)r   r   decoder   r   r?   r	   )r
   r)   r(   s   &&&r   writeHTMLWriter.writeU   s    eU##LL)EuW%Ldkk1KKKK'++g&'  	r   c                6   < V ^8  d   Qh/ S[ S[,          ;R&   # )   r?   )r   str)formatr;   s   "r   __annotate__HTMLWriter.__annotate__G   s      I r   )r?   r	   )N)r3   r4   r5   r6   r7   r?   r   rE   __annotate_func__r8   r9   r:   s   @r   r=   r=   G   s"     
 F  r   r=   c                   "    ] tR t^ftRt. ROtRtR# )SmallerHTMLWriterz]
HTMLWriter that doesn't generate spans for some junk.

Results in much smaller HTML output.
 N)	endmarkerindentdedentopnewlinenl)r3   r4   r5   r6   r7   r?   r8   rP   r   r   rO   rO   f   s     FFr   rO   c                 N   VP                  R 4       \        V! VP                   4      P                   4      P                  p \        P                  ! V P                  4       F  pVw  rVrxp	V! WVWxV	4       K  	  VP                  R4       R#   \        P
                   d     L*i ; i)s   <pre>s   </pre>
N)rE   r   r1   r   readline
TokenError)
inpoutr	   printerr)   	tokenTypestringstartendr,   s
   &&&       r   filterra   p   s    IIh6#)),223>>G&&s||4E491YDIu48 5
 IIk  s   7B B$#B$c                      ^ RI p \        V P                  RV P                  4      p\        V P                  ^,          R4      ;_uu_ 4       p\        W!4       RRR4       R#   + '       g   i     R# ; i)    Nbufferrb)sysgetattrstdoutopenargvra   )rf   rh   fs      r   mainrl   |   sI    SZZ3::6F	chhqk4	 	 Aq 
!	 	 	 s   A!!A2	__main__)r7   r   r   htmlr   typingr    r   r   r=   rO   ra   rl   r3   rP   r   r   <module>rq      sa   
     3  3 l >F
 F ' 	 zF r   