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:
|
||||
line = line[:-1]
|
||||
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()
|
||||
|
||||
|
||||
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__
|
||||
|
||||
|
@@ -8,16 +8,23 @@ class TestPanel(wxPanel):
|
||||
def __init__(self, parent):
|
||||
wxPanel.__init__(self, parent, -1)
|
||||
|
||||
b = wxButton(self, -1, "Play Sound", (25, 25))
|
||||
EVT_BUTTON(self, b.GetId(), self.OnButton)
|
||||
b = wxButton(self, -1, "Play Sound 1", (25, 25))
|
||||
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:
|
||||
import time
|
||||
if int(time.time()) % 2 == 1:
|
||||
wave = wxWave(opj('data/anykey.wav'))
|
||||
else:
|
||||
wave.Play()
|
||||
except NotImplementedError, v:
|
||||
wxMessageBox(str(v), "Exception Message")
|
||||
|
||||
|
||||
def OnButton2(self, evt):
|
||||
try:
|
||||
wave = wxWave(opj('data/plan.wav'))
|
||||
wave.Play()
|
||||
except NotImplementedError, v:
|
||||
|
Reference in New Issue
Block a user