本文整理汇总了Python中spyder.config.main.CONF.remove_option方法的典型用法代码示例。如果您正苦于以下问题:Python CONF.remove_option方法的具体用法?Python CONF.remove_option怎么用?Python CONF.remove_option使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类spyder.config.main.CONF
的用法示例。
在下文中一共展示了CONF.remove_option方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: delete_scheme
# 需要导入模块: from spyder.config.main import CONF [as 别名]
# 或者: from spyder.config.main.CONF import remove_option [as 别名]
def delete_scheme(self):
"""Deletes the currently selected custom color scheme."""
scheme_name = self.current_scheme
answer = QMessageBox.warning(self, _("Warning"),
_("Are you sure you want to delete "
"this scheme?"),
QMessageBox.Yes | QMessageBox.No)
if answer == QMessageBox.Yes:
# Put the combobox in Spyder by default, when deleting a scheme
names = self.get_option('names')
self.set_scheme('spyder')
self.schemes_combobox.setCurrentIndex(names.index('spyder'))
self.set_option('selected', 'spyder')
# Delete from custom_names
custom_names = self.get_option('custom_names', [])
if scheme_name in custom_names:
custom_names.remove(scheme_name)
self.set_option('custom_names', custom_names)
# Delete config options
for key in syntaxhighlighters.COLOR_SCHEME_KEYS:
option = "{0}/{1}".format(scheme_name, key)
CONF.remove_option(self.CONF_SECTION, option)
CONF.remove_option(self.CONF_SECTION,
"{0}/name".format(scheme_name))
self.update_combobox()
self.update_preview()
示例2: delete
# 需要导入模块: from spyder.config.main import CONF [as 别名]
# 或者: from spyder.config.main.CONF import remove_option [as 别名]
def delete(self):
if self.language is not None:
language = self.language.lower()
CONF.remove_option('lsp-server', language)