Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import ftplib # We import the FTP module
- session = ftplib.FTP('myserver.com','login','passord') # Connect to the FTP server
- myfile = open('toto.txt','rb') # Open the file to send
- session.storbinary('STOR toto.txt', myfile) # Send the file
- myfile.close() # Close the file
- session.quit() # Close FTP session
Advertisement
Add Comment
Please, Sign In to add comment