def record_summary(record, indent=' '):
 if (record.id == record.name):
  answer = ("%sID and Name='%s',\n%sSeq='" % (indent, record.id, indent))
 else:
  answer = ("%sID = '%s', Name='%s',\n%sSeq='" % (indent, record.id, record.name, indent))
 if (record.seq is None):
  answer += 'None'
 else:
  if (len(record.seq) > 50):
   answer += ((str(record.seq[:40]) + '...') + str(record.seq[(-7):]))
  else:
   answer += str(record.seq)
  answer += ("', length=%i" % len(record.seq))
 return answer

def record_summary ( record , indent = ' ' ) : if ( record . id == record . name ) : answer = ( "%sID and Name='%s',\n%sSeq='" % ( indent , record . id , indent ) ) else : answer = ( "%sID = '%s', Name='%s',\n%sSeq='" % ( indent , record . id , record . name , indent ) ) if ( record . seq is None ) : answer += 'None' else : if ( len ( record . seq ) > 50 ) : answer += ( ( str ( record . seq [ : 40 ] ) + '...' ) + str ( record . seq [ ( - 7 ) : ] ) ) else : answer += str ( record . seq ) answer += ( "', length=%i" % len ( record . seq ) ) return answer
returns a concise summary of a seqrecord object as a string .