Skip to content

Instantly share code, notes, and snippets.

@niceaji
Created October 19, 2012 03:10
Show Gist options
  • Save niceaji/3916016 to your computer and use it in GitHub Desktop.
Save niceaji/3916016 to your computer and use it in GitHub Desktop.
python-ftp파일업로드
#!/usr/bin/env python
import ftplib
ftp = ftplib.FTP('host','user','password')
fname = "업로드할 파일명(path포함가능"
full_fname = "로컬파일명(path포함가능)"
ftp.storlines('STOR '+ fname, open(full_fname, 'rb'))
ftp.quit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment