More little demo updates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14585 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -19,11 +19,7 @@ line = sys.stdin.readline()
|
|||||||
while line:
|
while line:
|
||||||
line = line[:-1]
|
line = line[:-1]
|
||||||
sys.stdout.write('\nYou typed "%s"\n' % line)
|
sys.stdout.write('\nYou typed "%s"\n' % line)
|
||||||
sys.stdout.flush()
|
|
||||||
#sys.stderr.write('\nTyped you "%s" Yoda say...\n' % line)
|
|
||||||
#sys.stderr.flush()
|
|
||||||
line = sys.stdin.readline()
|
line = sys.stdin.readline()
|
||||||
|
|
||||||
|
|
||||||
sys.stdout.write('\nExiting...\n')
|
sys.stdout.write('\nExiting...\n')
|
||||||
sys.stdout.flush()
|
|
||||||
|
Binary file not shown.
@@ -46,3 +46,4 @@ def runTest(frame, nb, log):
|
|||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
|
|
||||||
overview = wxPython.lib.rightalign.__doc__
|
overview = wxPython.lib.rightalign.__doc__
|
||||||
|
|
||||||
|
@@ -8,17 +8,24 @@ class TestPanel(wxPanel):
|
|||||||
def __init__(self, parent):
|
def __init__(self, parent):
|
||||||
wxPanel.__init__(self, parent, -1)
|
wxPanel.__init__(self, parent, -1)
|
||||||
|
|
||||||
b = wxButton(self, -1, "Play Sound", (25, 25))
|
b = wxButton(self, -1, "Play Sound 1", (25, 25))
|
||||||
EVT_BUTTON(self, b.GetId(), self.OnButton)
|
EVT_BUTTON(self, b.GetId(), self.OnButton1)
|
||||||
|
|
||||||
|
b = wxButton(self, -1, "Play Sound 2", (25, 65))
|
||||||
|
EVT_BUTTON(self, b.GetId(), self.OnButton2)
|
||||||
|
|
||||||
|
|
||||||
def OnButton(self, evt):
|
def OnButton1(self, evt):
|
||||||
try:
|
try:
|
||||||
import time
|
wave = wxWave(opj('data/anykey.wav'))
|
||||||
if int(time.time()) % 2 == 1:
|
wave.Play()
|
||||||
wave = wxWave(opj('data/anykey.wav'))
|
except NotImplementedError, v:
|
||||||
else:
|
wxMessageBox(str(v), "Exception Message")
|
||||||
wave = wxWave(opj('data/plan.wav'))
|
|
||||||
|
|
||||||
|
def OnButton2(self, evt):
|
||||||
|
try:
|
||||||
|
wave = wxWave(opj('data/plan.wav'))
|
||||||
wave.Play()
|
wave.Play()
|
||||||
except NotImplementedError, v:
|
except NotImplementedError, v:
|
||||||
wxMessageBox(str(v), "Exception Message")
|
wxMessageBox(str(v), "Exception Message")
|
||||||
|
Reference in New Issue
Block a user