当前位置: 首页>>代码示例>>Python>>正文


Python CONF.set方法代码示例

本文整理汇总了Python中spyderlib.config.CONF.set方法的典型用法代码示例。如果您正苦于以下问题:Python CONF.set方法的具体用法?Python CONF.set怎么用?Python CONF.set使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在spyderlib.config.CONF的用法示例。


在下文中一共展示了CONF.set方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: toggle_wrap_mode

# 需要导入模块: from spyderlib.config import CONF [as 别名]
# 或者: from spyderlib.config.CONF import set [as 别名]
 def toggle_wrap_mode(self, checked):
     """Toggle wrap mode"""
     if self.tabwidget is None:
         return
     for editor in self.editors:
         editor.toggle_wrap_mode(checked)
     CONF.set(self.ID, 'wrap', checked)
开发者ID:cheesinglee,项目名称:spyder,代码行数:9,代码来源:history.py

示例2: option_changed

# 需要导入模块: from spyderlib.config import CONF [as 别名]
# 或者: from spyderlib.config.CONF import set [as 别名]
 def option_changed(self, option, value):
     """
     Change a plugin option in configuration file
     Use a SIGNAL to call it, e.g.:
     self.emit(SIGNAL('option_changed'), 'show_all', checked)
     """
     CONF.set(self.ID, option, value)
开发者ID:Brainsciences,项目名称:luminoso,代码行数:9,代码来源:__init__.py

示例3: toggle_codecompletion

# 需要导入模块: from spyderlib.config import CONF [as 别名]
# 或者: from spyderlib.config.CONF import set [as 别名]
 def toggle_codecompletion(self, checked):
     """Toggle automatic code completion"""
     if self.tabwidget is None:
         return
     for shell in self.shells:
         shell.shell.set_codecompletion_auto(checked)
     CONF.set(self.ID, 'codecompletion/auto', checked)
开发者ID:cheesinglee,项目名称:spyder,代码行数:9,代码来源:externalconsole.py

示例4: toggle_codecompletion

# 需要导入模块: from spyderlib.config import CONF [as 别名]
# 或者: from spyderlib.config.CONF import set [as 别名]
 def toggle_codecompletion(self, checked):
     """Toggle code completion"""
     if self.tabwidget is None:
         return
     for shell in self.shells:
         shell.shell.set_codecompletion(checked)
     CONF.set(self.ID, 'autocompletion/enabled', checked)
开发者ID:Brainsciences,项目名称:luminoso,代码行数:9,代码来源:externalconsole.py

示例5: set_option

# 需要导入模块: from spyderlib.config import CONF [as 别名]
# 或者: from spyderlib.config.CONF import set [as 别名]
 def set_option(self, option, value):
     """
     Set a plugin option in configuration file
     Use a SIGNAL to call it, e.g.:
     plugin.sig_option_changed.emit('show_all', checked)
     """
     CONF.set(self.CONF_SECTION, str(option), value)
开发者ID:ymarfoq,项目名称:outilACVDesagregation,代码行数:9,代码来源:__init__.py

示例6: toggle_wrap_mode

# 需要导入模块: from spyderlib.config import CONF [as 别名]
# 或者: from spyderlib.config.CONF import set [as 别名]
 def toggle_wrap_mode(self, checked):
     """Toggle wrap mode"""
     if self.tabwidget is None:
         return
     for shell in self.shells:
         shell.shell.toggle_wrap_mode(checked)
     CONF.set(self.ID, 'wrap', checked)
开发者ID:Brainsciences,项目名称:luminoso,代码行数:9,代码来源:externalconsole.py

示例7: toggle_codecompletion_enter

# 需要导入模块: from spyderlib.config import CONF [as 别名]
# 或者: from spyderlib.config.CONF import set [as 别名]
 def toggle_codecompletion_enter(self, checked):
     """Toggle Enter key for code completion"""
     if self.tabwidget is None:
         return
     for shell in self.shells:
         shell.shell.set_codecompletion_enter(checked)
     CONF.set(self.ID, 'autocompletion/enter-key', checked)
开发者ID:Brainsciences,项目名称:luminoso,代码行数:9,代码来源:externalconsole.py

示例8: run

# 需要导入模块: from spyderlib.config import CONF [as 别名]
# 或者: from spyderlib.config.CONF import set [as 别名]
    def run(self, session):
        from spyderlib import spyder
        from spyderlib.config import CONF

        cs.exit_if_not_exists(session)
        app = spyder.initialize()

        # This should come from our command line parser, however, Spyder does
        # not provide a way to get the argument parser but only the parsed
        # arguments.
        opts = {'working_directory': cs.path(),
                'debug': False,
                'profile': False,
                'multithreaded': False,
                'light': False,
                'new_instance': True}

        # The python executable is set explicitly here, because Spyder tends
        # not to pick up the one used in a virtualenv. This should be set in a
        # profile in order to not mess with the user's settings.
        CONF.set('console', 'pythonexecutable', sys.executable)

        main = spyder.MainWindow(Bunch(opts))
        main.setup()
        main.show()
        main.open_file(cs.path(session))

        app.exec_()
开发者ID:ufo-kit,项目名称:concert,代码行数:30,代码来源:spyder.py

示例9: toggle_calltips

# 需要导入模块: from spyderlib.config import CONF [as 别名]
# 或者: from spyderlib.config.CONF import set [as 别名]
 def toggle_calltips(self, checked):
     """Toggle calltips"""
     if self.tabwidget is None:
         return
     for shell in self.shells:
         shell.shell.set_calltips(checked)
     CONF.set(self.ID, 'calltips', checked)
开发者ID:Brainsciences,项目名称:luminoso,代码行数:9,代码来源:externalconsole.py

示例10: setup_api

# 需要导入模块: from spyderlib.config import CONF [as 别名]
# 或者: from spyderlib.config.CONF import set [as 别名]
 def setup_api(self):
     """Load and prepare Python API"""
     if self.lexer() is None:
         return
     self.api = QsciAPIs(self.lexer())
     is_api_ready = False
     api_path = CONF.get('editor', 'api')
     if not osp.isfile(api_path):
         from spyderlib.config import DATA_PATH
         api_path = osp.join(DATA_PATH, 'python.api')
         if osp.isfile(api_path):
             CONF.set('editor', 'api', api_path)
         else:
             return False
     api_size = CONF.get('editor', 'api_size', None)
     current_api_size = os.stat(api_path).st_size
     if api_size is not None and api_size == current_api_size:
         if self.api.isPrepared():
             is_api_ready = self.api.loadPrepared()
     else:
         CONF.set('editor', 'api_size', current_api_size)
     if not is_api_ready:
         if self.api.load(api_path):
             self.api.prepare()
             self.connect(self.api, SIGNAL("apiPreparationFinished()"),
                          self.api.savePrepared)
     return is_api_ready
开发者ID:cheesinglee,项目名称:spyder,代码行数:29,代码来源:qscieditor.py

示例11: change_exteditor

# 需要导入模块: from spyderlib.config import CONF [as 别名]
# 或者: from spyderlib.config.CONF import set [as 别名]
 def change_exteditor(self):
     """Change external editor path"""
     path, valid = QInputDialog.getText(self, self.tr('External editor'),
                       self.tr('External editor executable path:'),
                       QLineEdit.Normal,
                       CONF.get(self.ID, 'external_editor/path'))
     if valid:
         CONF.set(self.ID, 'external_editor/path', unicode(path))
开发者ID:cheesinglee,项目名称:spyder,代码行数:10,代码来源:console.py

示例12: change_history_depth

# 需要导入模块: from spyderlib.config import CONF [as 别名]
# 或者: from spyderlib.config.CONF import set [as 别名]
 def change_history_depth(self):
     "Change history max entries"""
     depth, valid = QInputDialog.getInteger(self, self.tr('History'),
                                    self.tr('Maximum entries'),
                                    CONF.get(self.ID, 'max_entries'),
                                    10, 10000)
     if valid:
         CONF.set(self.ID, 'max_entries', depth)
开发者ID:Brainsciences,项目名称:luminoso,代码行数:10,代码来源:pylintgui.py

示例13: save_config

# 需要导入模块: from spyderlib.config import CONF [as 别名]
# 或者: from spyderlib.config.CONF import set [as 别名]
 def save_config(self):
     """Save configuration: opened projects & tree widget state"""
     data = self.get_project_config()
     cPickle.dump(data, file(self.DATAPATH, 'w'))
     CONF.set(self.ID, 'expanded_state',
              self.treewidget.get_expanded_state())
     CONF.set(self.ID, 'scrollbar_position',
              self.treewidget.get_scrollbar_position())
开发者ID:cheesinglee,项目名称:spyder,代码行数:10,代码来源:projectexplorer.py

示例14: change_max_line_count

# 需要导入模块: from spyderlib.config import CONF [as 别名]
# 或者: from spyderlib.config.CONF import set [as 别名]
 def change_max_line_count(self):
     "Change maximum line count"""
     mlc, valid = QInputDialog.getInteger(self, self.tr('Buffer'),
                                        self.tr('Maximum line count'),
                                        CONF.get(self.ID, 'max_line_count'),
                                        10, 1000000)
     if valid:
         self.shell.setMaximumBlockCount(mlc)
         CONF.set(self.ID, 'max_line_count', mlc)
开发者ID:cheesinglee,项目名称:spyder,代码行数:11,代码来源:console.py

示例15: _get_run_configurations

# 需要导入模块: from spyderlib.config import CONF [as 别名]
# 或者: from spyderlib.config.CONF import set [as 别名]
def _get_run_configurations():
    history_count = CONF.get('run', 'history', 20)
    try:
        return [(filename, options)
                for filename, options in CONF.get('run', 'configurations', [])
                if osp.isfile(filename)][:history_count]
    except ValueError:
        CONF.set('run', 'configurations', [])
        return []
开发者ID:arvindchari88,项目名称:newGitTest,代码行数:11,代码来源:runconfig.py


注:本文中的spyderlib.config.CONF.set方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。