cook
Aug 06, 2015 - 01:42
I have a UI with a buttonitem like this:
play_b = ui.ButtonItem(title='play',action=playmp3,enabled=True)
And then it calls to this function:
def playmp3(sender):
player = sound.Player('filename')
player.play()
Anyway- it won't play.
If I write the same code without a function it does play. But inside a function (UI or no UI) it won't play.
What can I do differently to get this working?