def find_aligned_codons(aln):
    """Returns the columns indices of the alignment that represent aligned
       codons.
    """
    # throw out codons with non mod 3 gaps
    ind2 = []
    for i in range(0, aln.alignlen(), 3):
        bad = False

        for key, val in aln.iteritems():
            codon = val[i:i+3]
            if "-" in codon and codon != "---":
                bad = True
                break

        if not bad:
            ind2.extend([i, i+1, i+2])

    return ind2