Skip to content

Instantly share code, notes, and snippets.

@3dgoose
Created December 29, 2023 18:42
Show Gist options
  • Save 3dgoose/b53cd170626f23da05726837b3a15fd4 to your computer and use it in GitHub Desktop.
Save 3dgoose/b53cd170626f23da05726837b3a15fd4 to your computer and use it in GitHub Desktop.
FTP program, Python 2.7
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