How to receive a data file of unknown length using a python socket?

2009-07-18 Thread twgray
I am attempting to send a jpeg image file created on an embedded device over a wifi socket to a Python client running on a Linux pc (Ubuntu). All works well, except I don't know, on the pc client side, what the file size is? The following is a snippet: [code] f = open("frame.jpg",mode =

Re: How to receive a data file of unknown length using a python socket?

2009-07-18 Thread twgray
On Jul 18, 4:43 pm, Irmen de Jong wrote: > twgray wrote: > > I am attempting to send a jpeg image file created on an embedded > > device over a wifi socket to a Python client running on a Linux pc > > (Ubuntu).  All works well, except I don't know, on the pc client side,

Re: How to receive a data file of unknown length using a python socket?

2009-07-18 Thread twgray
On Jul 18, 7:33 pm, MRAB wrote: > Nobody wrote: > > On Sat, 18 Jul 2009 14:33:48 -0700, twgray wrote: > > >> It appears to be locking up in  'data=self.s.recv(MAXPACKETLEN)' on > >> the final packet, which will always be less than MAXPACKETLEN. > >