Over a million developers have joined DZone.

Send A File Using FTP

·

import ftplib
s = ftplib.FTP('myserver.com','login','password') # Connect

f = open('todo.txt','rb')                # file to send
s.storbinary('STOR todo.txt', f)         # Send the file

f.close()                                # Close file and FTP
s.quit()

Taken (with some mod.) from here
Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}