def trainEpoch(self): choice = self.curChoices.pop() self.pieMenu.highlight(choice, style='pop') self.src.setMarker(self.choices.index(choice)+1.0) wx.CallLater(1000.0*self.trialSecs, self.trainClearTrial)