Posted By

stagger on 02/24/08


Tagged

textmate python FTP ttm thesis


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

aelien
wbowers


FTP Uploader


 / Published in: Python
 

  1. # Import FTP library:
  2. import ftplib
  3. # Connect to the server:
  4. s = ftplib.FTP('server','user','password')
  5. # Open file to send:
  6. f = open('/folder/folder/local_filename','rb')
  7. # Store file on server:
  8. s.storbinary('STOR server_filename', f)
  9. # Close sent file:
  10. f.close()
  11. # Close server connection:
  12. s.quit()

Report this snippet  

You need to login to post a comment.