uploading a binary file with ftplib

Fredrik Lundh effbot at telia.com
Tue Mar 7 10:49:11 EST 2000


Sjoerd Mullender <sjoerd at oratrix.nl> wrote:
> > > ftp.storbinary('stor ravine.pyc',open('ravine.pyc','r').read(),2)
> >
> > ftp.storbinary('stor ravine.pyc', open('ravine.pyc','r'), 1024)
>
> Shouldn't that be ...open('ravine.pyc','rb')...
> (note the b).
> We are talking uploading a *binary* file here...

my mistake.

you're right, of course.

(however, the original messages was posted
from a Linux box, so the eff-bot claims that it
technically correct in the given context)

</F>





More information about the Python-list mailing list