Filtering bases based on phred qualities with pysam
The PileupRead object as a query_position attribute, which you can use for this:

for pileupcolumn in samfile.pileup() :
    for pileupread in pileupcolumn.pileups:
         if (pileupread.alignment.mapping_quality &lt;= 15):
             continue      
         if not pileupread.is_del and not pileupread.is_refskip:
             if pileupread.alignment.query_qualities[pileupread.query_position] &lt; 10:
                 # Skip entries with base phred scores &lt; 10
                 continue
             if pileupread.alignment.is_reverse: #negative
                   ReverseList[pileupcolumn.pos] += pileupread.alignment.query_sequence[pileupread.query_position]
             else:
                   ForwardList[pileupcolumn.pos] += pileupread.alignment.query_sequence[pileupread.query_position]


Note the 6th line, which implements a filter with a threshold of 10.