def write_record(record, fileobj):
 if hasattr(record, u'quality'):
  recstr = u'@{name}\n{sequence}\n+\n{quality}\n'.format(name=record.name, sequence=record.sequence, quality=record.quality)
 else:
  recstr = u'>{name}\n{sequence}\n'.format(name=record.name, sequence=record.sequence)
 try:
  fileobj.write(bytes(recstr, u'ascii'))
 except TypeError:
  fileobj.write(recstr)

def write_record ( record , fileobj ) : if hasattr ( record , u'quality' ) : recstr = u'@{name}\n{sequence}\n+\n{quality}\n' . format ( name = record . name , sequence = record . sequence , quality = record . quality ) else : recstr = u'>{name}\n{sequence}\n' . format ( name = record . name , sequence = record . sequence ) try : fileobj . write ( bytes ( recstr , u'ascii' ) ) except TypeError : fileobj . write ( recstr )
add a record to the logs buffer .