def write_Fasta_from_name_seq_pairs(name_seqs, fh):
 if (fh is None):
  raise ValueError('Need open file handle to write to.')
 for (name, seq) in name_seqs:
  fh.write(('%s\n' % BiologicalSequence(seq, id=name).to_fasta()))

def write_Fasta_from_name_seq_pairs ( name_seqs , fh ) : if ( fh is None ) : raise ValueError ( 'Need open file handle to write to.' ) for ( name , seq ) in name_seqs : fh . write ( ( '%s\n' % BiologicalSequence ( seq , id = name ) . to_fasta ( ) ) )
writes a list of to filehandle .