Simple FTP Client

Metnetsky matt at uberstats.com
Sat Feb 1 20:09:25 EST 2003


I'm trying to write a very small script that will connect to a host and 
download a file (much more to come in the future).  The following is what 
I've assembled from the ftplib manual.  

        from ftplib import FTP

        ftp = FTP('ftp.thepaperclipse.com')
        ftp.login("drgoslee", "patribus")
        ftp.retrbinary('RETR ./httpdocs/dbbackups/PaperClipse_sql.tar.gz');
        ftp.quit()


Naturally however, I am getting an error.

        ftp.retrbinary('RETR/usr/local/psa/home/vhosts/thepaperclipse.com/\
        httpdocs/dbbackups/PaperClipse_sql.tar.gz');
        
        TypeError: retrbinary() takes at least 3 arguments (2 given)

It makes sense, but I don't know how to correct it.  What do I need to set 
the other parameter(s) to?  Any suggestions would be greatly appreciated.

~ Metnetsky




More information about the Python-list mailing list