]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxPython/demo/wxWave.py
fixed compilation under Unix where SQL_DATETIME is not defined
[wxWidgets.git] / wxPython / demo / wxWave.py
... / ...
CommitLineData
1
2from wxPython.wx import *
3from Main import opj
4
5#----------------------------------------------------------------------
6
7class TestPanel(wxPanel):
8 def __init__(self, parent):
9 wxPanel.__init__(self, parent, -1)
10
11 b = wxButton(self, -1, "Play Sound 1", (25, 25))
12 EVT_BUTTON(self, b.GetId(), self.OnButton1)
13
14 b = wxButton(self, -1, "Play Sound 2", (25, 65))
15 EVT_BUTTON(self, b.GetId(), self.OnButton2)
16
17
18 def OnButton1(self, evt):
19 try:
20 wave = wxWave(opj('data/anykey.wav'))
21 wave.Play()
22 except NotImplementedError, v:
23 wxMessageBox(str(v), "Exception Message")
24
25
26 def OnButton2(self, evt):
27 try:
28 wave = wxWave(opj('data/plan.wav'))
29 wave.Play()
30 except NotImplementedError, v:
31 wxMessageBox(str(v), "Exception Message")
32
33
34#----------------------------------------------------------------------
35
36def runTest(frame, nb, log):
37 win = TestPanel(nb)
38 return win
39
40#----------------------------------------------------------------------
41
42
43overview = """\
44"""