???<!-- GIF89;a -->
123123123123
.....................................................................................................................................???<!-- GIF89;a -->
123123123123
.....................................................................................................................................ó
{fc           @   sá   d  d l  Z  d  d l Z d  d l Z d  d l Z d  d l m Z d  d l m Z e Z	 d „  Z
 d „  Z e j e ƒ  e j ƒ Z e j d e j ƒ Z d e f d „  ƒ  YZ d	 „  Z e d
 k rÝ d  d l m Z e e ƒ n  d S(   iÿÿÿÿN(   t	   Delegator(   t   idleConfc         C   s   d |  d j  | ƒ d S(   s9   Return a named group pattern matching list of alternates.s   (?P<%s>t   |t   )(   t   join(   t   namet
   alternates(    (    s.   /usr/lib64/python2.7/idlelib/ColorDelegator.pyt   any
   s    c          C   sý   d t  d t j ƒ d }  g  t t ƒ D]! } | j d ƒ s' t | ƒ ^ q' } | j d ƒ d t  d | ƒ d } t  d d g ƒ } d	 } | d
 } | d } | d } | d }	 t  d | |	 | | g ƒ }
 |  d | d | d |
 d t  d d g ƒ S(   Ns   \bt   KEYWORDt   _t   prints   ([^.'\"\\#]\b|^)t   BUILTINt   COMMENTs   #[^\n]*s(   (\br|u|ur|R|U|UR|Ur|uR|b|B|br|Br|bR|BR)?s   '[^'\\\n]*(\\.[^'\\\n]*)*'?s   "[^"\\\n]*(\\.[^"\\\n]*)*"?s'   '''[^'\\]*((\\.|'(?!''))[^'\\]*)*(''')?s'   """[^"\\]*((\\.|"(?!""))[^"\\]*)*(""")?t   STRINGR   t   SYNCs   \n(   R   t   keywordt   kwlistt   dirt   __builtin__t
   startswitht   strt   remove(   t   kwR   t   builtinlistt   builtint   commentt   stringprefixt   sqstringt   dqstringt	   sq3stringt	   dq3stringt   string(    (    s.   /usr/lib64/python2.7/idlelib/ColorDelegator.pyt   make_pat   s    !



s   \s+(\w+)t   ColorDelegatorc           B   s˜   e  Z d  „  Z d „  Z d „  Z d „  Z d d „ Z d d „ Z d Z	 e
 Z e Z d d „ Z d Z d d „ Z d „  Z d	 „  Z d
 „  Z d „  Z RS(   c         C   s-   t  j |  ƒ t |  _ t |  _ |  j ƒ  d  S(   N(   R    t   __init__t   progt   idprogt   LoadTagDefs(   t   self(    (    s.   /usr/lib64/python2.7/idlelib/ColorDelegator.pyR"   '   s    		c         C   s   |  j  d  k	 r |  j d ƒ n  t j |  | ƒ | d  k	 rk |  j ƒ  |  j d |  j ƒ |  j d d ƒ n t	 |  _
 t |  _ d  S(   Ns   <<toggle-auto-coloring>>s   1.0t   end(   t   delegatet   Nonet   unbindR    t   setdelegatet   config_colorst   bindt   toggle_colorize_eventt   notify_ranget   Truet   stop_colorizingt   Falset   allow_colorizing(   R&   R(   (    (    s.   /usr/lib64/python2.7/idlelib/ColorDelegator.pyR+   -   s    
	c         C   sJ   x6 |  j  j ƒ  D]% \ } } | r |  j | |  q q W|  j d ƒ d  S(   Nt   sel(   t   tagdefst   itemst   tag_configuret	   tag_raise(   R&   t   tagt   cnf(    (    s.   /usr/lib64/python2.7/idlelib/ColorDelegator.pyR,   :   s    c         C   sÝ   t  j ƒ  } i	 t  j | d ƒ d 6t  j | d ƒ d 6t  j | d ƒ d 6t  j | d ƒ d 6t  j | d	 ƒ d
 6i d  d 6d  d 6d 6i d  d 6d  d 6d 6t  j | d ƒ d 6t  j | d ƒ d 6|  _ t rÙ d G|  j GHn  d  S(   NR   R   R   R   R   R   R   R   t
   definitiont
   DEFINITIONt
   backgroundt
   foregroundR   t   TODOt   errort   ERRORt   hitR5   (   R   t   CurrentThemet   GetHighlightR)   R5   t   DEBUG(   R&   t   theme(    (    s.   /usr/lib64/python2.7/idlelib/ColorDelegator.pyR%   @   s     c         C   sG   |  j  | ƒ } |  j j | | | ƒ |  j | | d t | ƒ ƒ d  S(   Ns   +%dc(   t   indexR(   t   insertR/   t   len(   R&   RG   t   charst   tags(    (    s.   /usr/lib64/python2.7/idlelib/ColorDelegator.pyRH   Q   s    c         C   s3   |  j  | ƒ } |  j j | | ƒ |  j | ƒ d  S(   N(   RG   R(   t   deleteR/   (   R&   t   index1t   index2(    (    s.   /usr/lib64/python2.7/idlelib/ColorDelegator.pyRL   V   s    c         C   s‡   |  j  d | | ƒ |  j r. t r* d GHn  d  S|  j rQ t |  _ t rQ d GHqQ n  |  j rƒ t rh d GHn  |  j d |  j ƒ |  _ n  d  S(   NR?   s   colorizing already scheduleds   stop colorizings   schedule colorizingi   (	   t   tag_addt   after_idRE   t
   colorizingR0   R1   R3   t   aftert
   recolorize(   R&   RM   RN   (    (    s.   /usr/lib64/python2.7/idlelib/ColorDelegator.pyR/   _   s    	 		 	 c         C   sw   |  j  r9 |  j  } d  |  _  t r) d GHn  |  j | ƒ n  t |  _ t |  _ | rs |  j sg | j	 ƒ  qs | |  _
 n  d  S(   Ns   cancel scheduled recolorizer(   RP   R)   RE   t   after_cancelR2   R3   R0   R1   RQ   t   destroyt   close_when_done(   R&   RV   RP   (    (    s.   /usr/lib64/python2.7/idlelib/ColorDelegator.pyt   closem   s    			 			c         C   sÅ   |  j  r9 |  j  } d  |  _  t r) d GHn  |  j | ƒ n  |  j re |  j re t rY d GHn  t |  _ n  |  j |  _ |  j r  |  j r  |  j d |  j	 ƒ |  _  n  t rÁ d G|  j r¹ d p¼ d GHn  d S(   Ns   cancel scheduled recolorizers   stop colorizingi   s   auto colorizing turnedt   ont   offt   break(
   RP   R)   RE   RT   R3   RQ   R0   R1   RR   RS   (   R&   t   eventRP   (    (    s.   /usr/lib64/python2.7/idlelib/ColorDelegator.pyR.   {   s"    			  c         C   s3  d  |  _ |  j s$ t r  d GHn  d  S|  j s? t r; d GHn  d  S|  j rZ t rV d GHn  d  Sz\ t |  _ t |  _ t r} d GHn  t	 j
 ƒ  } |  j ƒ  t	 j
 ƒ  } t rµ d | | GHn  Wd  t |  _ X|  j r|  j d d ƒ rt rì d GHn  |  j d	 |  j ƒ |  _ n  |  j r/|  j } d  |  _ | j ƒ  n  d  S(
   Ns   no delegates   auto colorizing is offs   already colorizings   colorizing...s   %.3f secondsR?   s   1.0s   reschedule colorizingi   (   R)   RP   R(   RE   R3   RQ   R2   R1   R0   t   timet   clockt   recolorize_maint   tag_nextrangeRR   RS   RV   RU   (   R&   t   t0t   t1t   top(    (    s.   /usr/lib64/python2.7/idlelib/ColorDelegator.pyRS   Œ   s@    		 	 	 		 
 
 			c         C   s­  d } x t  r¨|  j d | ƒ } | s+ Pn  | \ } } |  j d | | ƒ |  j d | ƒ } | ro | d } n d } d } | } d } t } x| s¤| } |  j | d | ƒ } t | d d ƒ } d |  j | d	 ƒ k } |  j | | ƒ }	 |	 sû d  Sx* |  j	 j
 ƒ  D] }
 |  j |
 | | ƒ qW| |	 } |  j j | ƒ } xî | r4xÆ | j ƒ  j ƒ  D]² \ } } | r`| j | ƒ \ } } |  j | | d
 | | d
 | ƒ | d k r|  j j | | ƒ } | r| j d ƒ \ } } |  j d | d
 | | d
 | ƒ qqq`q`W|  j j | | j ƒ  ƒ } qGWd |  j | d	 ƒ k r]| } d } n t } | s||  j d | ƒ n  |  j ƒ  |  j r t rd GHn  d  Sq Wq	 Wd  S(   Ns   1.0R?   R   i   t    s   +%d lines linestarti   id   s   -1cs   +%dct   deft   classR<   s   colorizing stopped(   Rd   Re   (   R0   R_   t
   tag_removet   tag_prevrangeR2   RG   t   mint	   tag_namest   getR5   t   keysR#   t   searcht	   groupdictR6   t   spanRO   R$   t   matchR'   t   updateR1   RE   (   R&   t   nextt   itemt   headt   tailRJ   t   lines_to_gett   okt   markt   lineR9   t   mt   keyt   valuet   at   bt   m1(    (    s.   /usr/lib64/python2.7/idlelib/ColorDelegator.pyR^   ©   sl    		
				
	 c         C   s1   x* |  j  j ƒ  D] } |  j | d d ƒ q Wd  S(   Ns   1.0R'   (   R5   Rk   Rf   (   R&   R9   (    (    s.   /usr/lib64/python2.7/idlelib/ColorDelegator.pyt   removecolorsê   s    N(   t   __name__t
   __module__R"   R+   R,   R%   R)   RH   RL   RP   R0   R3   R2   RQ   R/   RV   RW   R.   RS   R^   R   (    (    (    s.   /usr/lib64/python2.7/idlelib/ColorDelegator.pyR!   %   s    							Ac   	      C   sØ   d d l  m } m } d d l m } | |  ƒ } | j d ƒ | j d |  j ƒ  d |  j ƒ  d f ƒ d } | | d	 d
 ƒ} | j	 d d d d ƒ | j
 d | ƒ | j ƒ  | | ƒ } t ƒ  } | j | ƒ d  S(   Niÿÿÿÿ(   t   Toplevelt   Text(   t
   Percolators   Test ColorDelegators   200x100+%d+%diÈ   i–   s'   if somename: x = 'abc' # comment
print
R=   t   whitet   expandi   t   fillt   bothRH   (   t   TkinterR‚   Rƒ   t   idlelib.PercolatorR„   t   titlet   geometryt   winfo_rootxt   winfo_rootyt   packRH   t	   focus_setR!   t   insertfilter(	   t   parentR‚   Rƒ   R„   Rb   t   sourcet   textt   pt   d(    (    s.   /usr/lib64/python2.7/idlelib/ColorDelegator.pyt   _color_delegatorî   s    
	t   __main__(   t   run(   R\   t   reR   R   t   idlelib.DelegatorR    t   idlelib.configHandlerR   R2   RE   R   R    t   compilet   SR#   R$   R!   R—   R€   t   idlelib.idle_test.htestR™   (    (    (    s.   /usr/lib64/python2.7/idlelib/ColorDelegator.pyt   <module>   s   		É	