faqts : Computers : Programming : Languages : Python : Modules : ftplib

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

21 of 23 people (91%) answered Yes
Recently 10 of 10 people (100%) answered Yes

Entry

How do I upload a binary file with ftplib?

Sep 26th, 2002 00:03
Penelope Marr, Mike Hostetler, http://x27.deja.com/threadmsg_md.xp?thitnum=18&AN=594136886.1&mhitnum=1&CONTEXT=952438976.840630313


from ftplib import FTP

ftp = FTP('host')

ftp.login('username','password')

ftp.storbinary('stor file', open('file','r'), 1024)

ftp.quit()
ftp.close()