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

发布时间:2020-07-04 19:42:09 作者:Yvonne254
来源:网络 阅读:512

如下资料是关于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
推荐阅读:
  1. php文件上传到远程ftp服务器代码封装
  2. php列出目录下所有文件带点击链接

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

服务器互动 列出 下的

上一篇:Android源码个个击破之LocationManager

下一篇:三星笔记本np2470用u盘启动方法

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》