]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/wxWave.py
2 from wxPython
.wx
import *
5 #----------------------------------------------------------------------
7 class TestPanel(wxPanel
):
8 def __init__(self
, parent
):
9 wxPanel
.__init
__(self
, parent
, -1)
11 b
= wxButton(self
, -1, "Play Sound", (25, 25))
12 EVT_BUTTON(self
, b
.GetId(), self
.OnButton
)
15 def OnButton(self
, evt
):
18 if int(time
.time()) % 2 == 1:
19 wave
= wxWave(opj('data/anykey.wav'))
21 wave
= wxWave(opj('data/plan.wav'))
23 except NotImplementedError, v
:
24 wxMessageBox(str(v
), "Exception Message")
27 #----------------------------------------------------------------------
29 def runTest(frame
, nb
, log
):
33 #----------------------------------------------------------------------