def get_gimdata(self):
import urllib, os
if self.file_exist():
print "No need to download GIM data..."
return
print "Start to download GIM data..."
weblink = "ftp://ftp.unibe.ch/aiub/CODE/{0}/".format(self.year)
if not os.path.isfile(self.sourcefn[:-2]):
if not os.path.isfile(self.sourcefn):
download = urllib.URLopener()
download.retrieve(weblink+self.sourcefn, self.sourcefn)
os.system("gzip -fd {0}".format(self.sourcefn))
评论列表
文章目录