16 Star 44 Fork 45

现任明教教主-乾颐堂 / qytang_Python

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
2016.1.20 FTP下载文件.urllib 429 Bytes
一键复制 编辑 原始数据 按行查看 历史
现任明教教主-乾颐堂 提交于 2016-01-20 10:20 . new file
import os, getpass
import urllib.request
filename = 'ftp.txt'
password = getpass.getpass('Pswd?')
remoteaddr = 'ftp://collinsctk:%s@172.16.1.2/%s;type=i' % (password, filename)
print('Downloading', remoteaddr)
#urllib.request.urlretrieve(remoteaddr, filename)
remotefile = urllib.request.urlopen(remoteaddr)
localfile = open(filename, 'wb')
localfile.write(remotefile.read())
localfile.close()
remotefile.close()
Python
1
https://gitee.com/qytang/qytang_Python.git
git@gitee.com:qytang/qytang_Python.git
qytang
qytang_Python
qytang_Python
master

搜索帮助