ftplib and FTP Objects...

Andy Gimblett gimbo at ftech.net
Fri Apr 12 06:16:11 EDT 2002


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

-- 
Andy Gimblett - Programmer - Frontier Internet Services Limited
Tel: 029 20 820 044 Fax: 029 20 820 035 http://www.frontier.net.uk/
Statements made are at all times subject to Frontier's Terms and
Conditions of Business, which are available upon request.





More information about the Python-list mailing list