[Tutor] wav sound

Adam adam at monkeez.org
Thu Aug 5 11:32:37 CEST 2004


I'm writing a wxPython app and want to play small wav files.
Anyone suggest how to do this? I'd like it to be
cross-platform friendly. 

So far I have...

sounds = {30:'a.wav', 31:'b.wav'.... and so on}
sound_file = 'sound_media/' + sounds[text]
playsound = open(sound_file,'rb')
totalframes = playsound.getnframes()
playsound.readframes(totalframes)

but it's not working - am I wrong to assume that it is this
simple? 

Thanks
Adam

-- 
=============================
site: http://www.monkeez.org
wiki: http://wiki.monkeez.org
=============================


More information about the Tutor mailing list