Re: socket receive file does not match sent file

2005-11-08 Thread [EMAIL PROTECTED]
Thanks Fredrik Lundh, This is great! I've rewrote the code and it works! Thanks a lot. -- http://mail.python.org/mailman/listinfo/python-list

Re: socket receive file does not match sent file

2005-11-08 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > while True: >data = f.read(8192) >if not data: break >else: >s.send(data) > What is the cause of the problem, can anyone tell me? using sendall instead of send should fix this. see the library reference for details: send( s

Re: socket receive file does not match sent file

2005-11-07 Thread Irmen de Jong
[EMAIL PROTECTED] wrote: > when I test the two program in the same OS, > i mean from a redhat 9 OS to a redhat 9 OS, > It's ok. receivefile match sent file. > > > But when I run receiver on a Redhat 9, > and send file from a windows XP, > the received file's size is randomized. > > May be that

Re: socket receive file does not match sent file

2005-11-06 Thread [EMAIL PROTECTED]
when I test the two program in the same OS, i mean from a redhat 9 OS to a redhat 9 OS, It's ok. receivefile match sent file. But when I run receiver on a Redhat 9, and send file from a windows XP, the received file's size is randomized. May be that's where the problem is. -- http://mail.pyt

Re: socket receive file does not match sent file

2005-11-06 Thread Jean-Paul Calderone
On 6 Nov 2005 09:13:03 -0800, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: >I wrote two simple socket program. >one for sending a file and the other for receiving the file. >but when I run it, a curious thing happened. >The received file was samller that the sent file. Your sender does not take