通过本文主要向大家介绍了python ftp服务器,python ftp,python ftp下载,python ftp.nlst,python ftp上传等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
本文实例讲述了python实现从ftp服务器下载文件的方法。分享给大家供大家参考。具体实现方法如下:
import ftplib
ftp = ftblib.FTP("ftp.yourServer.com")
ftp.login("username","password")
filename = "index.html"
ftp.storlines("STOR "+filename,open(filename))
filename="app.exe"
ftp.storbinary("STOR "+filename,open(filename,"rb"),1024)
</div>
希望本文所述对大家的Python程序设计有所帮助。
</div>
