summaryrefslogtreecommitdiffstats
path: root/Demo/stdwin
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-12-14 14:11:15 (GMT)
committerGuido van Rossum <guido@python.org>1992-12-14 14:11:15 (GMT)
commit5ba6142723e59d8761328a78a71cd70e327846de (patch)
tree04b617b22e411c480cd395f4e94aa141a2d3b5c7 /Demo/stdwin
parent63f4cdcdb8e60ba94cb47a44c12cc73079561014 (diff)
downloadcpython-5ba6142723e59d8761328a78a71cd70e327846de.zip
cpython-5ba6142723e59d8761328a78a71cd70e327846de.tar.gz
cpython-5ba6142723e59d8761328a78a71cd70e327846de.tar.bz2
Adapted to modern times
Diffstat (limited to 'Demo/stdwin')
-rwxr-xr-xDemo/stdwin/jukebox.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/Demo/stdwin/jukebox.py b/Demo/stdwin/jukebox.py
index 0a74458..ff520db 100755
--- a/Demo/stdwin/jukebox.py
+++ b/Demo/stdwin/jukebox.py
@@ -1,4 +1,4 @@
-#! /usr/local/python
+#! /usr/local/bin/python
# XXX This only works on SGIs running IRIX 4.0 or higher
@@ -39,7 +39,7 @@ from Buttons import PushButton
# Pathnames
DEF_DB = '/usr/local/sounds' # Default directory of sounds
-SOX = '/usr/local/sox' # Sound format conversion program
+SOX = '/usr/local/bin/sox' # Sound format conversion program
SFPLAY = '/usr/sbin/sfplay' # Sound playing program
@@ -311,7 +311,12 @@ validrates = (8000, 11025, 16000, 22050, 32000, 44100, 48000)
def playfile(filename):
killchild()
- tuple = sndhdr.what(filename)
+ try:
+ tuple = sndhdr.what(filename)
+ except IOError, msg:
+ print 'Can\'t open', filename, msg
+ stdwin.fleep()
+ return
raw = 0
if tuple:
mode, rate = tuple[:2]