Kaydet (Commit) 70f12886 authored tarafından Guido van Rossum's avatar Guido van Rossum

Use binary mode to open "wave" files.

üst 5db5ba1e
......@@ -13,7 +13,7 @@ nframes = 100
testfile = tempfile.mktemp()
f = wave.open(testfile, 'w')
f = wave.open(testfile, 'wb')
f.setnchannels(nchannels)
f.setsampwidth(sampwidth)
f.setframerate(framerate)
......@@ -22,7 +22,7 @@ output = '\0' * nframes * nchannels * sampwidth
f.writeframes(output)
f.close()
f = wave.open(testfile, 'r')
f = wave.open(testfile, 'rb')
check(nchannels == f.getnchannels(), "nchannels")
check(sampwidth == f.getsampwidth(), "sampwidth")
check(framerate == f.getframerate(), "framerate")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment