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


Python util.err函数代码示例

本文整理汇总了Python中terminatorlib.util.err函数的典型用法代码示例。如果您正苦于以下问题:Python err函数的具体用法?Python err怎么用?Python err使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: executeStep

 def executeStep(self, step, terminal, terminalElement):
     if step == DIRECTORY_ATTRIBUTE:
         self.setDirectory(terminal, terminalElement)
     elif step == EXPORT_TERMINAL_NUMBER_ATTRIBUTE:
         self.exportTerminalNumber(terminal, self.exportVariable)
     elif step == COMMAND_ATTRIBUTE:
         self.executeTerminalCommand(terminal, terminalElement)
     else:
         err("ignoring unknown step [%s]" % step)
开发者ID:sfate,项目名称:TerminatorPlugins,代码行数:9,代码来源:LayoutManager.py

示例2: execute_step

 def execute_step(self, step, terminal, terminal_element):
     if step == DIRECTORY_ATTRIBUTE:
         self.set_directory(terminal, terminal_element)
     elif step == EXPORT_TERMINAL_NUMBER_ATTRIBUTE:
         self.export_terminal_number(terminal, self.export_variable)
     elif step == COMMAND_ATTRIBUTE:
         self.execute_terminal_command(terminal, terminal_element)
     else:
         err('ignoring unknown step [%s]' % step)
开发者ID:aedis,项目名称:TerminatorPlugins,代码行数:9,代码来源:LayoutManager.py

示例3: get_orientation

    def get_orientation(paned):
        if isinstance(paned, VPaned):
            orientation = VERTICAL_VALUE
        else:
            if not isinstance(paned, HPaned):
                err('unknown Paned type; will use: %s' % HORIZONTAL_VALUE)
            orientation = HORIZONTAL_VALUE

        return orientation
开发者ID:aedis,项目名称:TerminatorPlugins,代码行数:9,代码来源:LayoutManager.py

示例4: isVerticalOrientation

 def isVerticalOrientation(self, orientation):
     if orientation is None:
         err("orientation is None; use default")
     elif orientation == HORIZONTAL_VALUE:
         return False
     elif not orientation == VERTICAL_VALUE:
         err("unknown orientation [%s]; use default" % orientation)
         
     return True
开发者ID:sfate,项目名称:TerminatorPlugins,代码行数:9,代码来源:LayoutManager.py

示例5: getOrientation

 def getOrientation(self, paned):
     if isinstance(paned, VPaned):
         orientation = VERTICAL_VALUE
     else: 
         if not isinstance(paned, HPaned):
             err("unknown Paned type; use %s" % HORIZONTAL_VALUE)           
         orientation = HORIZONTAL_VALUE
         
     return orientation
开发者ID:sfate,项目名称:TerminatorPlugins,代码行数:9,代码来源:LayoutManager.py

示例6: is_vertical_orientation

    def is_vertical_orientation(orientation):
        if orientation is None:
            err('orientation is None; use default')
        elif orientation == HORIZONTAL_VALUE:
            return False
        elif not orientation == VERTICAL_VALUE:
            err('unknown orientation [%s]; use default' % orientation)

        return True
开发者ID:aedis,项目名称:TerminatorPlugins,代码行数:9,代码来源:LayoutManager.py

示例7: loadChildRecursive

 def loadChildRecursive(self,terminal,childElement):
     targetElement = childElement.find(SPLIT_ELEMENT)
     handled = self.tryLoadSplitRecursive(terminal, targetElement)
     
     if not handled:
         targetElement = childElement.find(TERMINAL_ELEMENT)
         handled = self.tryLoadTerminal(terminal, targetElement)
     
     if not handled:
         err("neither split, nor terminal found.")
开发者ID:sfate,项目名称:TerminatorPlugins,代码行数:10,代码来源:LayoutManager.py

示例8: load_child_recursive

    def load_child_recursive(self, terminal, child_element):
        target_element = self.try_get_xml_child(child_element, SPLIT_ELEMENT)
        handled = self.try_load_split_recursive(terminal, target_element)

        if not handled:
            target_element = self.try_get_xml_child(child_element, TERMINAL_ELEMENT)
            handled = self.try_load_terminal(terminal, target_element)

        if not handled:
            err('neither split, nor terminal found: %s' % child_element)
开发者ID:aedis,项目名称:TerminatorPlugins,代码行数:10,代码来源:LayoutManager.py

示例9: try_load_split_recursive

 def try_load_split_recursive(self, terminal, split_element):
     if split_element is None:
         return False
     split_children = list(self.try_get_xml_children(split_element, CHILD_ELEMENT))
     if len(split_children) == 2:
         orientation = self.try_get_xml_attribute(split_element, ORIENTATION_ATTRIBUTE)
         self.split_and_load_axis_recursive(terminal, orientation, split_children[0], split_children[1])
     else:
         err('split element needs exactly two child elements. You have: %d' % len(split_children))
     return True
开发者ID:walbinjr,项目名称:TerminatorPlugins,代码行数:10,代码来源:LayoutManager.py

示例10: save_recursive

 def save_recursive(self, target, element, terminal=None):
     if isinstance(target, Terminal):
         self.save_terminal(target, element)
     elif isinstance(target, Paned):
         self.save_paned_recursive(target, element)
     elif isinstance(target, Window):
         self.save_window_recursive(target, element, terminal)
     elif isinstance(target, Notebook):
         self.save_notebook_recursive(target, element, terminal)
     else:
         err('ignoring unknown target type %s' % target.__class__)
开发者ID:aedis,项目名称:TerminatorPlugins,代码行数:11,代码来源:LayoutManager.py

示例11: saveRecursive

 def saveRecursive(self, target, element, terminal = None):       
     if isinstance(target, Terminal):
         self.saveTerminal(target, element)
     elif isinstance(target, Paned):
         self.savePanedRecursive(target, element)
     elif isinstance(target, Window):
         self.saveWindowRecursiv(target, element, terminal)
     elif isinstance(target, Notebook):
         self.saveNotebookRecursiv(target, element, terminal)
     else:
         err("ignoring unknown target type")
开发者ID:sfate,项目名称:TerminatorPlugins,代码行数:11,代码来源:LayoutManager.py

示例12: insertCommandParameter

 def insertCommandParameter(self, command):
     if not command:
         return None
     
     if not self.parameter:
         err("no parameter left for terminal; ignoring command")
         return None
     
     parameter = self.parameter.pop()
     
     return command.replace(self.parameterPlaceholder, parameter)
开发者ID:sfate,项目名称:TerminatorPlugins,代码行数:11,代码来源:LayoutManager.py

示例13: parsePluginConfig

def parsePluginConfig(config):
    '''merge the default settings with settings from terminator's config'''
    ret = DEFAULT_SETTINGS
    pluginConfig = config.plugin_get_config(EXPORTER_NAME)
    if pluginConfig:
        for currentKey in ret.keys():
            if currentKey in pluginConfig:
                ret[currentKey] = pluginConfig[currentKey]
        for currentKey in pluginConfig:
            if not currentKey in ret:
                err("invalid config parameter: %s" % currentKey)
    return ret
开发者ID:sfate,项目名称:TerminatorPlugins,代码行数:12,代码来源:TerminalExporter.py

示例14: parse_plugin_config

def parse_plugin_config(config):
    """merge the default settings with settings from terminator's config"""
    ret = DEFAULT_SETTINGS
    plugin_config = config.plugin_get_config(EXPORTER_NAME)
    if plugin_config:
        for current_key in ret.keys():
            if current_key in plugin_config:
                ret[current_key] = plugin_config[current_key]
        for current_key in plugin_config:
            if current_key not in ret:
                err('invalid config parameter: %s' % current_key)
    return ret
开发者ID:aedis,项目名称:TerminatorPlugins,代码行数:12,代码来源:TerminalExporter.py

示例15: tryLoadSplitRecursive

    def tryLoadSplitRecursive(self, terminal, splitElement):
        if splitElement == None:
            return False
        #TODO: pass the position to terminator's pane
        #position = self.tryGetXmlAttribute(splitElement, POSITION_ATTRIBUTE)
        splitChildren = list(splitElement.findall(CHILD_ELEMENT))
        if len(splitChildren) == 2:
            orientation = self.tryGetXmlAttribute(splitElement, ORIENTATION_ATTRIBUTE) 
            self.splitAndLoadAxisRecursive(terminal, orientation, splitChildren[0], splitChildren[1])
        else:
            err("split element does not have exactly 2 child elements as children")

        return True
开发者ID:sfate,项目名称:TerminatorPlugins,代码行数:13,代码来源:LayoutManager.py


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