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
[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
[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
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
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