Getdata.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:gps2tec 作者: weihan1107 项目源码 文件源码
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))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号