]> git.saurik.com Git - wxWidgets.git/commitdiff
More little demo updates
authorRobin Dunn <robin@alldunn.com>
Wed, 13 Mar 2002 22:26:55 +0000 (22:26 +0000)
committerRobin Dunn <robin@alldunn.com>
Wed, 13 Mar 2002 22:26:55 +0000 (22:26 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14585 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/demo/data/echo.py
wxPython/demo/data/plan.wav
wxPython/demo/wxRightTextCtrl.py
wxPython/demo/wxWave.py

index d40a9f19885fba701007feae6743706eb2c5a4bd..0b3ea5817515d30bd3ee1ea2c7f1e9e72a9db367 100644 (file)
@@ -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()
index ea19f85d491eb8921fb217150425d283e9daae32..3ea22d7b772ccad6a3720491fe6e7ce55bce2685 100644 (file)
Binary files a/wxPython/demo/data/plan.wav and b/wxPython/demo/data/plan.wav differ
index 35cda41756b1f234c26c468c18cfba95861ad7b5..c6ef3b9d2f1dd96171027093af2c9b1e03ba9b58 100644 (file)
@@ -46,3 +46,4 @@ def runTest(frame, nb, log):
 #----------------------------------------------------------------------
 
 overview = wxPython.lib.rightalign.__doc__
+
index 3be8f9e71575bcd4db4cf2a07c522e5820ea823d..7d60ac09c4c600a3843c02b1c615c0ff6f62949a 100644 (file)
@@ -8,17 +8,24 @@ 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:
+            wave = wxWave(opj('data/anykey.wav'))
+            wave.Play()
+        except NotImplementedError, v:
+            wxMessageBox(str(v), "Exception Message")
+
+
+    def OnButton2(self, evt):
         try:
-            import time
-            if int(time.time()) % 2 == 1:
-                wave = wxWave(opj('data/anykey.wav'))
-            else:
-                wave = wxWave(opj('data/plan.wav'))
+            wave = wxWave(opj('data/plan.wav'))
             wave.Play()
         except NotImplementedError, v:
             wxMessageBox(str(v), "Exception Message")