Send a file using FTP
1 2 import ftplib 3 s = ftplib.FTP('myserver.com','login','password') # Connect 4 5 f = open('todo.txt','rb') # file to send 6 s.storbinary('STOR todo.txt', f) # Send the file 7 8 f.close() # Close file and FTP 9 s.quit()
Taken (with some mod.) from here