标签:request bsp 没有 code name urlopen from import 使用
from urllib.request import urlopen filename = ‘new_1.py‘ password = ‘password‘ #如果设置密码 #remoteaddr = ‘ftp://lutz:%s@192.168.191.1/%s;type=i‘%(password,filename) #如果没有设置密码 remoteaddr = ‘ftp://192.168.191.1/%s;type=i‘%(filename) print(‘Downloading...‘,remoteaddr) remotefile = urlopen(remoteaddr) localfile = open(filename,‘wb‘) localfile.write(remotefile.read()) localfile.close() remotefile.close() print(‘Finished‘)
标签:request bsp 没有 code name urlopen from import 使用
原文地址:http://www.cnblogs.com/fg2312/p/7636834.html