'Write the set of sequences back to the folder.'

def putsequences(self, sequences):

    fullname = self.getsequencesfilename()
    f = None
    for (key, seq) in sequences.iteritems():
        s = IntSet('', '    ')
        s.fromlist(seq)
        if (not f):
            f = open(fullname, 'w')
        f.write(('%s:    %s\n' % (key, s.tostring())))
    if (not f):
        try:
            os.unlink(fullname)
        except os.error:
            pass
    else:
        f.close()
    return
