I think this is still producing the same blasts but should be much faster. Read the comments in the code to to some more optimizing:
tf_data = {key: (int(val1), int(val2)) for key, val1, val2 in
(line.description.split() for line in
SeqIO.parse('deneme2.txt','fasta'))}
for cd_line in SeqIO.parse('Mus_musculus.GRCm38.74.cdna.all.fa','fasta'):
if cd_line.id in tf_data;
tempfile=open('tempfile.txt','w')
tf_val1, tf_va2 = tf_data[cd_line.id]
#If it is likely that the same tf_data-record is used many times
#move the math to the first line, if on the other hand it is
#very likely that most records won't be used in tf_data then
#move the int-casts back to the line below
tempfile.write('>{0}\n{1}'.format(
cd_line.id,
str(cd_line.seq)[tf_val1 - 100: tf_val2 + 100]))
tempfile.close()
os.system('makeblastdb -in tempfile.txt -dbtype nucl '
'-out tempfile.db -title \'tempfile\'')
cline = NcbiblastnCommandline(
query='SRR029153.fasta',
db="tempfile.db",
outfmt=7,
out=("{0} {1}".format(tf_val1, tf_val2)))
#Since not using stderr and stdout don't assign variables
cline()