def reformat_comment(data, limit, comment_header):
 lc = len(comment_header)
 data = '\n'.join((line[lc:] for line in data.split('\n')))
 format_width = max((limit - len(comment_header)), 20)
 newdata = reformat_paragraph(data, format_width)
 newdata = newdata.split('\n')
 block_suffix = ''
 if (not newdata[(-1)]):
  block_suffix = '\n'
  newdata = newdata[:(-1)]
 return ('\n'.join(((comment_header + line) for line in newdata)) + block_suffix)

def reformat_comment ( data , limit , comment_header ) : lc = len ( comment_header ) data = '\n' . join ( ( line [ lc : ] for line in data . split ( '\n' ) ) ) format_width = max ( ( limit - len ( comment_header ) ) , 20 ) newdata = reformat_paragraph ( data , format_width ) newdata = newdata . split ( '\n' ) block_suffix = '' if ( not newdata [ ( - 1 ) ] ) : block_suffix = '\n' newdata = newdata [ : ( - 1 ) ] return ( '\n' . join ( ( ( comment_header + line ) for line in newdata ) ) + block_suffix )
return data reformatted to specified width with comment header .