def playSelection(event): selection = int(tone_listbox.curselection()[0]) if selection == 0: noTone(PWM1) elif selection < 10: tone(PWM1, selection*100) else: noTone(PWM1)
def printselection(event): global mylist selection = int(mylist.curselection()[0]) if selection == 0: noTone(PWM1) elif selection < 10: tone(PWM1, selection*100, 100) else: noTone(PWM1)