def mimic_wrap(lines, wrap_at=65, **kwargs):
 l0 = textwrap.fill(lines[0], wrap_at, drop_whitespace=False).split(u'\n')
 (yield l0)
 def _(line):
  il0 = 0
  while (line and (il0 < (len(l0) - 1))):
   (yield line[:len(l0[il0])])
   line = line[len(l0[il0]):]
   il0 += 1
  if line:
   for ln in textwrap.fill(line, wrap_at, drop_whitespace=False).split(u'\n'):
    (yield ln)
 for l in lines[1:]:
  (yield list(_(l)))

def mimic_wrap ( lines , wrap_at = 65 , ** kwargs ) : l0 = textwrap . fill ( lines [ 0 ] , wrap_at , drop_whitespace = False ) . split ( u'\n' ) ( yield l0 ) def _ ( line ) : il0 = 0 while ( line and ( il0 < ( len ( l0 ) - 1 ) ) ) : ( yield line [ : len ( l0 [ il0 ] ) ] ) line = line [ len ( l0 [ il0 ] ) : ] il0 += 1 if line : for ln in textwrap . fill ( line , wrap_at , drop_whitespace = False ) . split ( u'\n' ) : ( yield ln ) for l in lines [ 1 : ] : ( yield list ( _ ( l ) ) )
wrap the first of lines with textwrap and the remaining lines at exactly the same positions as the first .