X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9318d9b32d9c954353a27eab526a6d0dac25eac3..f90387b4b4b34545f8131fe00df20048af57f1e2:/wxPython/demo/Sound.py diff --git a/wxPython/demo/Sound.py b/wxPython/demo/Sound.py index 91508ad5c8..de0e5b948e 100644 --- a/wxPython/demo/Sound.py +++ b/wxPython/demo/Sound.py @@ -54,8 +54,12 @@ class TestPanel(wx.Panel): style=wx.OPEN) if dlg.ShowModal() == wx.ID_OK: try: - sound = wx.Sound(dlg.GetPath()) - sound.Play() + #sound = wx.Sound(dlg.GetPath()) + #sound.Play() + + # another way to do it. + wx.Sound.PlaySound(dlg.GetPath()) + except NotImplementedError, v: wx.MessageBox(str(v), "Exception Message") dlg.Destroy()