新聞中心
這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
python鏈接遠(yuǎn)程ftp服務(wù)器并列出目錄下的文件的代碼
如下資料是關(guān)于python鏈接遠(yuǎn)程ftp服務(wù)器并列出目錄下的文件的代碼,希望對各位有用。
公司專注于為企業(yè)提供成都做網(wǎng)站、網(wǎng)站制作、微信公眾號開發(fā)、商城網(wǎng)站定制開發(fā),成都小程序開發(fā),軟件按需開發(fā)網(wǎng)站等一站式互聯(lián)網(wǎng)企業(yè)服務(wù)。憑借多年豐富的經(jīng)驗(yàn),我們會(huì)仔細(xì)了解各客戶的需求而做出多方面的分析、設(shè)計(jì)、整合,為客戶設(shè)計(jì)出具風(fēng)格及創(chuàng)意性的商業(yè)解決方案,創(chuàng)新互聯(lián)更提供一系列網(wǎng)站制作和網(wǎng)站推廣的服務(wù)。
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
網(wǎng)頁名稱:python鏈接遠(yuǎn)程ftp服務(wù)器并列出目錄下的文件的代碼
網(wǎng)站地址:http://fisionsoft.com.cn/article/pggjji.html