[Tutor] ftp file size puzle

Danny Yoo dyoo@hkn.eecs.berkeley.edu
Wed, 26 Jun 2002 13:41:56 -0700 (PDT)


On Wed, 26 Jun 2002, Pijus Virketis wrote:

> Danny,
>
> >There's one fix you'll want to make: you'll want to open the file in
> >binary mode:
> >
> >file = open("some_file_name", "b")
>
> 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. :)

I knew I should have tested that before writing it.  *grin* Thanks for the
correction.



(Pijus, by the way, your email server is doing weird things; when I send
messages to you, I get the following error message:

###
451 4.4.1 reply: read error from mail.virketis.com.
553 5.3.5 smtp.virketis.com. config error: mail loops back to me (MX
problem?)
554 5.3.5 Local configuration error
###

You may want to check smtp.virketis.com's mail settings; it looks wacky.
Someone else ran into this problem when replying to one of your messages.)