main.py 文件源码

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

项目:MDT 作者: cbclab 项目源码 文件源码
def _save_settings(self):
        """Save the current settings as a text file.

        Args:
            file_name: the filename to write to
        """
        current_model = self._controller.get_model()

        config_file = ['conf (*.conf)', 'All files (*)']
        file_name, used_filter = QFileDialog().getSaveFileName(caption='Select the GUI config file',
                                                               filter=';;'.join(config_file))
        if file_name:
            with open(file_name, 'w') as f:
                f.write(current_model.get_config().to_yaml())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号