gps2video.py 文件源码

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

项目:gps2video 作者: teawater 项目源码 文件源码
def parse_cmd(self):
        longopts = []
        for opt in self.opts:
            longopts.append(opt.option + "=")
        cmd_opts, config_file_path = getopt.getopt(sys.argv[1:], "", longopts)

        for arg, val in cmd_opts:
            for opt in self.opts:
                if "--" + opt.option == arg:
                    setattr(self, opt.attr, opt.convert(val))
                    break

        if len(config_file_path) == 0:
            self.config_file_path = "./config.ini"
        else:
            self.config_file_path = config_file_path[0]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号