how to fill many data strings from socket.recvfrom()

GuillaumeC fructidor00 at gmail.com
Sat Nov 3 17:49:13 EDT 2007


> data[i] is illegal.
> Any suggestion welcome!

Either initialize data before: data=[0]*200 before "while" or
(better):
...
i=0
data=[]
for i in range(200):
   d,addr= s.recvfrom(1024)
   data.append(d)





More information about the Python-list mailing list