configurator.py 文件源码

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

项目:steam-vr-wheel 作者: mdovgialo 项目源码 文件源码
def read_config(self):
        try:
            self.config = PadConfig()
        except ConfigException as e:
            msg = "Config error: {}. Load defaults?".format(e)
            dlg = wx.MessageDialog(self.pnl, msg, "Config Error", wx.YES_NO | wx.ICON_QUESTION)
            result = dlg.ShowModal() == wx.ID_YES
            dlg.Destroy()
            if result:
                self.config = PadConfig(load_defaults=True)
            else:
                sys.exit(1)
        for key, item in self._config_map.items():
            item.Set3StateValue(getattr(self.config, key))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号