I want to wait the song to finish after it finishes, I want to call another function
How do I do that in wxpython

After Long time searching I found nothig as such.
Then I tried to catch EVT_MEDIA_FINISHED by bind as shown belo

self.Bind(wx.media.EVT_MEDIA_FINISHED, self.onFinished_playing)

And the function below for modifying filename and call play

def onCheck_loop(self, path): #Loads file and calls play function
        self.path = path.strip()            
        if not self.player.Load(path):
            wx.MessageBox("Unable to Play this file, it is in the wrong format")
            self.SetTitle("Now Playing %s" %(self.path,))
    def onFinished_playing(self, evt): 
            print "Finished, starting next track"
            self.onSetPath_loop()       #detects finished song and calls another function to Load file     
    #play it
    def onPlay(self, evt):  
        self.slider.SetRange(0, self.player.Length())
This article has been dead for over six months. Start a new discussion instead.