欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

python連接遠程ftp服務器以及列出目錄下文件的方法

  發(fā)布時間:2015-04-02 10:38:14   作者:佚名   我要評論
本文實例講述了python連接遠程ftp服務器并列出目錄下文件的方法。分享給大家,,需要的朋友可以參考下

  本文實例講述了python連接遠程ftp服務器并列出目錄下文件的方法。分享給大家供大家參考。具體如下:

  這段python代碼用到了pysftp模塊,使用sftp協(xié)議,對數據進行加密傳輸

1

2

3

4

5

6

7

8

9

10

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

相關文章

最新評論