ftplib and FTP Objects...

jic cabrera at wrc.xerox.com
Fri Apr 12 08:59:54 EDT 2002


In article <mailman.1018606659.23241.python-list at python.org>, gimbo at ftech.net 
says...
>
>On Thu, Apr 11, 2002 at 05:47:42PM +0000, jic wrote:
>
>>       ftp.storbinary('STOR ' + fname,f.read )
>
>The second parameter's wrong: you want to call f.read() to get the
>file's contents, but in fact you're just passing a reference to the
>file object's read method.
>
>Try:
>
>ftp.storbinary('STOR ' + fname, f.read())
>
>Hope this helps,

Andy,

I did try that and it didn't work.  I also tried f.read(1024), 
f.read(100000000) and still didn't work.

thanks for your help.

josé







More information about the Python-list mailing list