Randomize auditory stimuli by a condition

Hello everyone,
I’m working on a new musical experiment in PsychoPy builder.

About stimuli,
I have created an Excel file with 3 columns:

BTA T1 T2
1 boabab_1.wav boabab_1.wav
0.9 boabab_0.9_pre.wav boabab_0.9_post.wav
0.8 boabab_0.8_pre.wav boabab_0.8_post.wav
0.7 boabab_0.7_pre.wav boabab_0.7_post.wav
0.6 boabab_0.6_pre.wav boabab_0.6_post.wav
0.5 boabab_0.5_pre.wav boabab_0.5_post.wav

This is done for 25 tracks with different track names (baobab is an example).

I would like to randomize the presentation of T1 or T2 for each BTA, e.g. if “boabab_0.9_pre.wav” is presented, “boabab_0.9_post.wav” is not presented.

I have created a Routine with a Sound Component (referred to the Excel, inserted in the loop, reported above) with its Code. I’m trying to write a script in this Code (Begin Routine) in order to set the randomization.

Moreover, I’m in trouble with how to recall the column of stimuli in the Sound Component considering that my stimuli in the excel are in two different columns.

Thank you!

Begin Experiment
thisTrack = boabab_1.wav

Begin Routine

if random() > .5:
     thisTrack = T1
     thisExp.addData('Track','T1')
else:
     thisTrack = T2
     thisExp.addData('Track','T2')