def _strip_header(doc):
 hdr = u'NIPYPE'
 cruft = u'\x1b'
 try:
  index = doc.index(hdr)
  index += len(hdr)
  index += 1
  doc = doc[index:]
  try:
   index = doc.index(cruft)
  except ValueError:
   index = len(doc)
  return doc[:index]
 except KeyError as e:
  raise_from(IOError(u'This docstring was not generated by Nipype!\n'), e)

def _strip_header ( doc ) : hdr = u'NIPYPE' cruft = u'\x1b' try : index = doc . index ( hdr ) index += len ( hdr ) index += 1 doc = doc [ index : ] try : index = doc . index ( cruft ) except ValueError : index = len ( doc ) return doc [ : index ] except KeyError as e : raise_from ( IOError ( u'This docstring was not generated by Nipype!\n' ) , e )
strip matlab header and splash info off doc .