python链接远程ftp服务器并列出目录下的文件的代码

如下资料是关于python链接远程ftp服务器并列出目录下的文件的代码,希望对各位有用。

公司专注于为企业提供成都做网站、网站制作、微信公众号开发、商城网站定制开发,成都小程序开发,软件按需开发网站等一站式互联网企业服务。凭借多年丰富的经验,我们会仔细了解各客户的需求而做出多方面的分析、设计、整合,为客户设计出具风格及创意性的商业解决方案,创新互联更提供一系列网站制作和网站推广的服务。

import pysftp

srv = pysftp.Connection(host="your_FTP_server", username="your_username",
password="your_password")

# Get the directory and file listing
data = srv.listdir()

# Closes the connection
srv.close()

# Prints out the directories and files, line by line
for i in data:
    print i

网站题目:python链接远程ftp服务器并列出目录下的文件的代码
路径分享:http://csdahua.cn/article/pggjji.html
扫二维码与项目经理沟通

我们在微信上24小时期待你的声音

解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流