]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/wxWave.py
2 from wxPython
.wx
import *
4 #----------------------------------------------------------------------
6 class TestPanel(wxPanel
):
7 def __init__(self
, parent
):
8 wxPanel
.__init
__(self
, parent
, -1)
10 b
= wxButton(self
, -1, "Play Sound", (25, 25))
11 EVT_BUTTON(self
, b
.GetId(), self
.OnButton
)
14 def OnButton(self
, evt
):
17 if int(time
.time()) % 2 == 1:
18 wave
= wxWave('data/anykey.wav')
20 wave
= wxWave('data/plan.wav')
22 except NotImplementedError, v
:
23 wxMessageBox(str(v
), "Exception Message")
26 #----------------------------------------------------------------------
28 def runTest(frame
, nb
, log
):
32 #----------------------------------------------------------------------