from Bio.SeqUtils import MeltingTemp as MT
primerfile = 'primerlist.txt'
for line in open(primerfile,'rU'):
    # prm stores the primer, without EOL character. 
    prm = line.replace('\n','')
    # %2.2f is used to print up to two integers, the
    # decimal separator and two decimal numbers.
    print '%s,%2.2f' % (prm, MT.Tm_staluc(prm))

This code is part of the book "Python for Bioinformatics", by Sebastian Bassi ( Return to home page.