<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
As you suggested, I open the file in binary and it did it i.e.<br>
<br>
before: f = open(outfile, "w")<br>
after: f = open(outfile, "wb")<br>
<br>
Thank you very much.&nbsp; I am new in Python and find this usergroup very
efficient.&nbsp; I posted several requests this past week, and always
received very useful information.<br>
<br>
michel belanger<br>
<br>
Karl Pfl&auml;sterer wrote:<br>
<blockquote cite="midm3vfmmb8gj.fsf@hamster.pflaesterer.de" type="cite">
  <pre wrap="">On  5 Feb 2004, Michel B&eacute;langer &lt;- <a class="moz-txt-link-abbreviated" href="mailto:michel.belanger@seidel.ca">michel.belanger@seidel.ca</a> wrote:

  </pre>
  <blockquote type="cite">
    <pre wrap="">but the file received is not the right size (larger), i.e. 5150 kb
received vs 5136 kb
Any idea why?
    </pre>
  </blockquote>
  <pre wrap=""><!---->
I'm not sure but you open the file for writing in text mode.  Try it
with binary 
  </pre>
</blockquote>
</body>
</html>