;ò

�ü?c           @   sP   d  k  Z  d f  d „  ƒ  YZ d „  Z d d „ Z d „  Z d „  Z d „  Z d  S(	   Ns   FormatParagraphc           B   s;   t  Z d d d f g f g Z d „  Z d „  Z d „  Z RS(   Ns   formats   Format Paragraphs   <<format-paragraph>>c         C   s   | |  _  d  S(   N(   s   editwins   self(   s   selfs   editwin(    (    s4   /mit/python/lib/python2.3/idlelib/FormatParagraph.pys   __init__   s    c         C   s   t  |  _ d  S(   N(   s   Nones   selfs   editwin(   s   self(    (    s4   /mit/python/lib/python2.3/idlelib/FormatParagraph.pys   close   s    c         C   sÍ  |  i i } |  i i ƒ  \ } } | o | o | i | | ƒ }
 d }	 n% t	 | | i
 d ƒ ƒ \ } } }	 }
 |	 oÂ |
 i d ƒ } t t |	 ƒ d „ | ƒ } d i | ƒ }
 t d t |	 ƒ d ƒ } t |
 | ƒ } | i d ƒ } d } | d o d } | d  } n |	 d „ } d i t | | ƒ ƒ | } n t |
 ƒ } | i d	 d
 d ƒ | |
 j oH | i d | ƒ | i ƒ  | i | | ƒ | i | | ƒ | i ƒ  n | i d | ƒ | i d ƒ d  S(   Ns    s   inserts   
c         C   s   |  | S(   N(   s   sts   l(   s   sts   l(    (    s4   /mit/python/lib/python2.3/idlelib/FormatParagraph.pys   <lambda>-   s    iF   i   iÿÿÿÿc         C   s   | |  S(   N(   s   prefixs   item(   s   items   prefix(    (    s4   /mit/python/lib/python2.3/idlelib/FormatParagraph.pys   <lambda>=   s    s   sels   1.0s   end(   s   selfs   editwins   texts   get_selection_indicess   firsts   lasts   gets   datas   comment_headers   find_paragraphs   indexs   splits   liness   maps   lens   joins   maxs   format_widths   reformat_paragraphs   newdatas   block_suffixs   builders
   tag_removes   mark_sets   undo_block_starts   deletes   inserts   undo_block_stops   see(   s   selfs   events   lasts   format_widths   builders   texts   block_suffixs   liness   newdatas   comment_headers   datas   first(    (    s4   /mit/python/lib/python2.3/idlelib/FormatParagraph.pys   format_paragraph_event!   s:    
$ 
(   s   __name__s
   __module__s   menudefss   __init__s   closes   format_paragraph_event(    (    (    s4   /mit/python/lib/python2.3/idlelib/FormatParagraph.pys   FormatParagraph   s   		c   
      C   s´  t  t | i d ƒ ƒ \ } } |  i d | d | ƒ } xP |  i	 d | d d ƒ o
 t
 | ƒ o( | d } |  i d | d | ƒ } q; W| } t | ƒ } t | ƒ }	 xN t | ƒ | j o t
 | |	 ƒ o( | d } |  i d | d | ƒ } q¬ Wd | } | d } |  i d | d | ƒ } x[ | d j o" t | ƒ | j o t
 | |	 ƒ o( | d } |  i d | d | ƒ } q+Wd | d } | | | |  i | | ƒ f Sd  S(   Ns   .s   %d.0s   %d.0 lineends   <s   endi   i    (   s   maps   ints   marks   splits   linenos   cols   texts   gets   lines   compares   is_all_whites   first_linenos   get_comment_headers   comment_headers   lens   comment_header_lens   lasts   first(
   s   texts   marks   lasts   first_linenos   firsts   linenos   lines   comment_headers   cols   comment_header_len(    (    s4   /mit/python/lib/python2.3/idlelib/FormatParagraph.pys   find_paragraphM   s,     '
 %


 2
iF   c         C   s  |  i d ƒ } d } t | ƒ } x- | | j  o t | | ƒ o | d } q$ W| | j o |  Sn t | | ƒ } | d | j  o t | | d ƒ o t | | d ƒ }	 n | }	 | |  } | } x| | j  o t | | ƒ oï t i d | | ƒ }
 xÈ t d t |
 ƒ d ƒ D]® } |
 | } | o qn t | | i ƒ  ƒ | j o
 | | j o | i | i ƒ  ƒ |	 } n | | d } | d t |
 ƒ j  o |
 | d d j o | d } qqW| d } qÎ W| i | i ƒ  ƒ | i | | ƒ d i | ƒ Sd  S(   Ns   
i    i   s   (\s+)i   s    (   s   datas   splits   liness   is   lens   ns   is_all_whites
   get_indents   indent1s   indent2s   news   partials   res   wordss   ranges   js   words
   expandtabss   limits   appends   rstrips   extends   join(   s   datas   limits   partials   is   words   js   liness   ns   indent1s   indent2s   wordss   new(    (    s4   /mit/python/lib/python2.3/idlelib/FormatParagraph.pys   reformat_paragraphf   s@     '
  
*
,c         C   s   t  i d |  ƒ t j	 Sd  S(   Ns   ^\s*$(   s   res   matchs   lines   None(   s   line(    (    s4   /mit/python/lib/python2.3/idlelib/FormatParagraph.pys   is_all_white‰   s    c         C   s   t  i d |  ƒ i ƒ  Sd  S(   Ns   ^(\s*)(   s   res   matchs   lines   group(   s   line(    (    s4   /mit/python/lib/python2.3/idlelib/FormatParagraph.pys
   get_indentŒ   s    c         C   s8   t  i d |  ƒ } | t j o d Sn | i d ƒ Sd  S(   Ns   ^(\s*#*)s    i   (   s   res   matchs   lines   ms   Nones   group(   s   lines   m(    (    s4   /mit/python/lib/python2.3/idlelib/FormatParagraph.pys   get_comment_header�   s     (   s   res   FormatParagraphs   find_paragraphs   reformat_paragraphs   is_all_whites
   get_indents   get_comment_header(   s   get_comment_headers
   get_indents   reformat_paragraphs   find_paragraphs   res   FormatParagraphs   is_all_white(    (    s4   /mit/python/lib/python2.3/idlelib/FormatParagraph.pys   ?   s   	:	#		