def normalize_paragraph(text, line_len=80, indent=''):
 text = _NORM_SPACES_RGX.sub(' ', text)
 line_len = (line_len - len(indent))
 lines = []
 while text:
  (aline, text) = splittext(text.strip(), line_len)
  lines.append((indent + aline))
 return linesep.join(lines)

def normalize_paragraph ( text , line_len = 80 , indent = '' ) : text = _NORM_SPACES_RGX . sub ( ' ' , text ) line_len = ( line_len - len ( indent ) ) lines = [ ] while text : ( aline , text ) = splittext ( text . strip ( ) , line_len ) lines . append ( ( indent + aline ) ) return linesep . join ( lines )
normalize a text to display it with a maximum line size and optionally arbitrary indentation .