;ň
iłŢ>c           @   s   d    Z  d S(   c         C   s    t  | d  |  i d   Sd S(   s
  
    A word-wrap function that preserves existing line breaks
    and most spaces in the text. Expects that existing line
    breaks are posix newlines (
). Taken from
    http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/148061
    Authored by Mike Brown
    c         C   sL   d |  d t |  |  i d  d  t | i d d  d  | j | f S(   Ns   %s%s%ss    
s   
i   i    (   s   lines   lens   rfinds   words   splits   width(   s   lines   words   width(    (    s+   /home/delire/devel/python/pyKit-OSC/wrap.pys   <lambda>	   s    s    N(   s   reduces   widths   texts   split(   s   texts   width(    (    s+   /home/delire/devel/python/pyKit-OSC/wrap.pys   wrap   s     N(   s   wrap(   s   wrap(    (    s+   /home/delire/devel/python/pyKit-OSC/wrap.pys   ?   s    