On Feb 7, 2008 9:39 AM, kettle <[EMAIL PROTECTED]> wrote:
> f = open('/home/myuname/socket.wav','rb')
> audio = ""
> for line in f:
> audio += line
I don't know anything about socket programming in python, but this bit
doesn't seem right for working on a binary file. You should just read
all of the data into audio in one go, like this:
f = open('/home/myuname/socket.wav','rb')
audio = f.read()
There's no need to iterate over the lines in the file, since it's
quite likely that there really aren't any 'lines' in a binary file.
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list