Guest User

Untitled

a guest
Dec 13th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. import ftplib
  2. server = '127.0.0.1'
  3. username = 'localhost'
  4. password = 'hello123'
  5. ftp_connection = ftplib.FTP(server, username, password)
  6. remote_path = "C:UserssaiDesktopImageS"
  7. ftp_connection.cwd(remote_path)
  8. fh = open("/home/pi/Desktop/ImageS/test.txt", 'rb')
  9. ftp_connection.storbinary('STOR test.txt', fh)
  10. fh.close()
Add Comment
Please, Sign In to add comment