From: Guido van Rossum Date: Mon, 14 Dec 1992 14:11:15 +0000 (+0000) Subject: Adapted to modern times X-Git-Tag: v0.9.8~64 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5ba6142723e59d8761328a78a71cd70e327846de;p=thirdparty%2FPython%2Fcpython.git Adapted to modern times --- diff --git a/Demo/stdwin/jukebox.py b/Demo/stdwin/jukebox.py index 0a74458c9ee5..ff520dbca0e4 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]