[Tutor] ftp file size puzle
Pijus Virketis
virketis@post.harvard.edu
Wed, 26 Jun 2002 21:34:41 +0300
<HTML><HEAD>
<BASEFONT FACE=3D"Arial" SIZE=3D"2" COLOR=3D"#000000">
</HEAD>
<BODY>
<div>Danny,<br></div>
<div><br>
<FONT COLOR=3D"#000080">>There's one fix you'll want to make:=
you'll want to open the file in</FONT><br>
<FONT COLOR=3D"#000080">>binary mode:</FONT><br>
<FONT COLOR=3D"#000080">></FONT><br>
<FONT COLOR=3D"#000080">>file =3D open("some_file_name",=
"b")</FONT><br>
<br>
Your suggestion was right on! One little detail. It seems that in=
order to open up a file in binary, the modifier should actually=
be "rb" or "wb", because "b" on=
its own gives an IOError in P2.2.1. Just in case someone else=
wants to try this at home. :)<br></div>
<div> </div>
<div>Thanks for a quick reply, <br></div>
<div> </div>
<div>Pijus<br></div>
<div> </div>
<div>-- <br></div>
<div>"Anyone attempting to generate random numbers by=
deterministic means is, of course, living in a state of=
sin." -- John Von Neumann<br></div>
</body></html>