Created
December 29, 2023 18:42
-
-
Save 3dgoose/b53cd170626f23da05726837b3a15fd4 to your computer and use it in GitHub Desktop.
FTP program, Python 2.7
This file contains hidden or 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 | |
ftp = ftplib.FTP('ftp.cluster028.hosting.ovh.net') | |
ftp.login('user', 'passwd') | |
ftp.cwd('/folder') | |
# Ouvrez le fichier à envoyer | |
with open('file', 'rb') as f: | |
ftp.storbinary('STOR file.ext', f) | |
ftp.quit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment