Last active
April 4, 2016 20:09
-
-
Save dogancankilment/44a3a1e7ee7347afabc2adabe3852ca3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ftplib | |
def ftp_upload(): | |
ftp = ftplib.FTP("yourdomain.com") | |
ftp.login("ftp_username", "ftp_password") | |
upload_file = "/full/path/your/file.txt" | |
ftp.storlines("STOR " + upload_file, open(upload_file)) | |
if __name__ == '__main__': | |
ftp_upload() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment