Search code examples
pythonaudiowavwave

why does import wave produce a figure of a wave and not play wav files


The following link has an example of using python wave to play a wav file.

pyaudio help play a file

The trouble is on my computer any script with 'import wave' just produces a picture of a wave and does nothing else. (i.e. the rest of the script doesn't even run.) I have no idea why this is. Is there a way to fix this? I'm running python 2.7 on windows XP.


Solution

  • Most likely you have a file called wave.py in your current directory (or somewhere in your PYTHONPATH) that is run instead of the standard library module of the same name.