Getdata.py 文件源码

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

项目:gps2tec 作者: weihan1107 项目源码 文件源码
def get_p1p2data(self):
        import urllib, os
        if self.file_exist():
            print "No need to download P1P2 DCB data..."
            return
        print "Start to download P1P2 DCB data..."
        weblink = "ftp://ftp.unibe.ch/aiub/CODE/{0}/".format(self.year)
        if not os.path.isfile(self.sourcefn):
            try:
                download = urllib.URLopener()
                download.retrieve(weblink+self.sourcefn, self.sourcefn)
            except IOError:
                weblink = "ftp://ftp.unibe.ch/aiub/CODE/{0}/".format(self.year_bom)
                download = urllib.URLopener()
                download.retrieve(weblink+self.sourcefn_bom, self.sourcefn)


        os.system("gzip -fd {0}".format(self.sourcefn))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号