+
+ def OnSelectSound(self, evt):
+ dlg = wx.FileDialog(wx.GetTopLevelParent(self),
+ "Choose a sound file",
+ wildcard="WAV files (*.wav)|*.wav",
+ style=wx.OPEN)
+ if dlg.ShowModal() == wx.ID_OK:
+ try:
+ #sound = wx.Sound(dlg.GetPath(), wx.SOUND_SYNC)
+ #sound.Play()
+
+ # another way to do it.
+ wx.Sound.PlaySound(dlg.GetPath(), wx.SOUND_SYNC)
+
+ except NotImplementedError, v:
+ wx.MessageBox(str(v), "Exception Message")
+ dlg.Destroy()
+
+