???<!-- GIF89;a -->
123123123123
.....................................................................................................................................???<!-- GIF89;a -->
123123123123
.....................................................................................................................................ó
¿œ^c           @   sÄ   d  d l  Z  d  d l Td  d l m Z d  d l m Z d Z d Z e  j d ƒ Z e  j d ƒ Z e  j d	 ƒ Z	 d
 e f d „  ƒ  YZ
 d e
 f d „  ƒ  YZ e Z d „  Z e d k rÀ e ƒ  n  d S(   iÿÿÿÿN(   t   *(   t   _tkinter(   t   ScrolledTexts   *-Courier-Bold-R-Normal-*-120-*s!   *-Courier-Medium-O-Normal-*-120-*s:   ^     Page [1-9][0-9]*[ 	]+\|^.*Last change:.*[1-9][0-9]*
s   ^[ 	]*
s   ^[ 	]*[Xv!_][Xv!_ 	]*
t   EditableManPagec           B   sn   e  Z d d  „ Z d „  Z d „  Z d „  Z e Z d „  Z d „  Z	 d „  Z
 d „  Z d „  Z d	 d
 „ Z RS(   c         K   sh   t  t j |  | f | ƒ |  j d d d ƒ|  j d d t ƒ|  j d d t ƒd  |  _ d |  _ d  S(   Nt   Xt	   underlinei   t   !t   fontt   _i    (	   t   applyR   t   __init__t
   tag_configt   BOLDFONTt
   ITALICFONTt   Nonet   fpt   lineno(   t   selft   mastert   cnf(    (    s2   /usr/lib64/python2.7/Demo/tkinter/guido/ManPage.pyR
      s    	c         C   s   |  j  d  k S(   N(   R   R   (   R   (    (    s2   /usr/lib64/python2.7/Demo/tkinter/guido/ManPage.pyt   busy%   s    c         C   s   |  j  ƒ  r |  j ƒ  n  d  S(   N(   R   t
   _endparser(   R   (    (    s2   /usr/lib64/python2.7/Demo/tkinter/guido/ManPage.pyt   kill)   s    c         C   s-   |  j  | ƒ |  j j | t j |  j ƒ d  S(   N(   t   _startparsert   tkt   createfilehandlerR   t   READABLEt   _filehandler(   R   R   (    (    s2   /usr/lib64/python2.7/Demo/tkinter/guido/ManPage.pyt   asyncparsefile.   s    c         C   s4   |  j  j ƒ  } | s# |  j ƒ  d  S|  j | ƒ d  S(   N(   R   t   readlineR   t
   _parseline(   R   R   t   maskt   nextline(    (    s2   /usr/lib64/python2.7/Demo/tkinter/guido/ManPage.pyR   6   s
    
c         C   sz   d d l  m  } | d | d „ } |  j |  d ƒ } |  j | ƒ x' | j ƒ  } | s[ Pn  |  j | ƒ qE W|  j ƒ  d  S(   Niÿÿÿÿ(   t   selectg        c         S   s   | |  g g  g  | ƒ d S(   Ni    (    (   R   t   toutR!   (    (    s2   /usr/lib64/python2.7/Demo/tkinter/guido/ManPage.pyt   avail@   s    t   height(   R!   t   getintR   R   R   R   (   R   R   R!   R#   R$   R    (    (    s2   /usr/lib64/python2.7/Demo/tkinter/guido/ManPage.pyt   syncparsefile>   s    c         C   s   |  j  ƒ  r t d ‚ n  | j ƒ  | |  _ d |  _ d |  _ d |  _ d  |  _ |  d } t	 |  d <|  j
 d t ƒ | |  d <d  S(   Ns   startparser: still busyi    t   states   1.0(   R   t   RuntimeErrort   filenoR   R   t   okt   emptyR   t   buffert   NORMALt   deletet   END(   R   R   t	   savestate(    (    s2   /usr/lib64/python2.7/Demo/tkinter/guido/ManPage.pyR   L   s    
					

c         C   sŠ   |  j  ƒ  s t d ‚ n  |  j r1 |  j d ƒ n  y |  j j |  j ƒ Wn t k
 r] } n X|  j j ƒ  d  |  _ |  `
 |  ` |  ` d  S(   Ns   endparser: not busyt    (   R   R(   R,   R   R   t   deletefilehandlerR   t   TclErrort   closeR   R*   R+   (   R   t   msg(    (    s2   /usr/lib64/python2.7/Demo/tkinter/guido/ManPage.pyR   [   s    		c         C   s  |  j  s | |  _  d  St j |  j  ƒ d k rD d |  _ | |  _  d  S|  j  } t j | ƒ d k rt | } d  |  _  n d  } | |  _  |  j s¢ d |  _ d |  _ d  St j | ƒ d k rÍ d |  _ d |  _ d  S|  d } t |  d <t	 d k r |  j
 d d ƒ n |  j
 d t ƒ |  j rB|  j d ƒ |  j d |  _ d |  _ n  | sX|  j | ƒ n’ d } d } xr t t t | ƒ t | ƒ ƒ ƒ D]O } | | | k r†| | k  rÈ|  j | | | !| ƒ | } n  | | } q†q†W|  j | | ƒ |  j d |  _ | |  d <d  S(	   Ni    i   R'   g      @t   inserts   end-1cs   
R1   (   R,   t	   emptyprogt   matchR+   t   ulprogR   R*   t
   footerprogR-   t	   TkVersiont   mark_setR/   t   _insert_propR   t   ranget   mint   len(   R   R    t   textlinet   proplineR0   t   pt   jt   i(    (    s2   /usr/lib64/python2.7/Demo/tkinter/guido/ManPage.pyR   i   sV    											

	(	t    c         C   s“   |  j  t ƒ  ƒ } |  j t ƒ  | ƒ t d k rj |  j | ƒ } x' | D] } |  j | | t ƒ  ƒ qG Wn  | d k r |  j | | t ƒ  ƒ n  d  S(   Ng      @RF   (   t   indext   AtInsertR6   R;   t	   tag_namest
   tag_removet   tag_add(   R   t   strt   propt   heret   tagst   tag(    (    s2   /usr/lib64/python2.7/Demo/tkinter/guido/ManPage.pyR=   ¥   s    N(   t   __name__t
   __module__R   R
   R   R   R   t	   parsefileR   R&   R   R   R   R=   (    (    (    s2   /usr/lib64/python2.7/Demo/tkinter/guido/ManPage.pyR      s   								<t   ReadonlyManPagec           B   s   e  Z d d  „ Z RS(   c         K   s'   t  | d <t t j |  | f | ƒ d  S(   NR'   (   t   DISABLEDR	   R   R
   (   R   R   R   (    (    s2   /usr/lib64/python2.7/Demo/tkinter/guido/ManPage.pyR
   ³   s    
N(   RQ   RR   R   R
   (    (    (    s2   /usr/lib64/python2.7/Demo/tkinter/guido/ManPage.pyRT   °   s   c    	      C   sN  d d  l  }  d d  l } d } d } d } | j d r] | j d d k r] d } | j d =n  | j d rz | j d } n | } | s¾ | d d !d k r¦ | d	 } n  |  j j | | ƒ } n  t ƒ  } | j d d ƒ t | d
 t d d ƒ} | j	 d d d t
 ƒ | rt | d ƒ } n |  j d | d ƒ } | j | ƒ | j ƒ  d  S(   Niÿÿÿÿs   /usr/local/man/mannt   Tcli    i   s   -fiþÿÿÿt   .s   .nt   relieft   borderwidthi   t   expandt   fillt   rs   nroff -man %s | ul -i(   t   ost   syst   argvt   patht   joint   Tkt   minsizet   ManPaget   SUNKENt   packt   BOTHt   opent   popenRS   t   mainloop(	   R]   R^   t   MANDIRt   DEFAULTPAGEt	   formattedt   namet   roott   manpageR   (    (    s2   /usr/lib64/python2.7/Demo/tkinter/guido/ManPage.pyt   test½   s0     	t   __main__(   t   ret   TkinterR   R   R   R   t   compileR:   R7   R9   R   RT   Rd   Rq   RQ   (    (    (    s2   /usr/lib64/python2.7/Demo/tkinter/guido/ManPage.pyt   <module>   s   
	œ	