[Python] python通过pysftp加密上传、下载ftp服务器文件 →→→→→进入此内容的聊天室

来自 , 2019-06-18, 写在 Python, 查看 121 次.
URL http://www.code666.cn/view/c165ed49
  1. import pysftp
  2. import sys
  3.  
  4. # Defines the name of the file for download / upload
  5. remote_file = sys.argv[1]
  6.  
  7. srv = pysftp.Connection(host="your_FTP_server", username="your_username",
  8. password="your_password")
  9.  
  10. # Download the file from the remote server
  11. srv.get(remote_file)
  12.  
  13. # To upload the file, simple replace get with put.
  14. srv.put(remote_file)
  15.  
  16. # Closes the connection
  17. srv.close()
  18. #//python/8427

回复 "python通过pysftp加密上传、下载ftp服务器文件"

这儿你可以回复上面这条便签

captcha