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


Python ArgsUtils.addIfMissing方法代码示例

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


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

示例1: __init__

# 需要导入模块: from pyaid.ArgsUtils import ArgsUtils [as 别名]
# 或者: from pyaid.ArgsUtils.ArgsUtils import addIfMissing [as 别名]
    def __init__(self, **kwargs):
        """Creates a new instance of MarkupTagError."""

        self._errorAtEnd = ArgsUtils.extract("errorAtEnd", False, kwargs)

        ArgsUtils.addIfMissing("errorDef", self.READ_FAILURE, kwargs, True)
        MarkupError.__init__(self, **kwargs)
开发者ID:sernst,项目名称:StaticFlow,代码行数:9,代码来源:MarkupTagError.py

示例2: __init__

# 需要导入模块: from pyaid.ArgsUtils import ArgsUtils [as 别名]
# 或者: from pyaid.ArgsUtils.ArgsUtils import addIfMissing [as 别名]
 def __init__(self, **kwargs):
     """Creates a new instance of BarPlot."""
     ArgsUtils.addIfMissing('yLabel', 'Frequency', kwargs)
     super(BarPlot, self).__init__(**kwargs)
     self.color      = kwargs.get('color', 'b')
     self.strokeColor = kwargs.get('strokeColor', 'none')
     self.data       = kwargs.get('data', [])
     self.isLog      = kwargs.get('isLog', False)
开发者ID:sernst,项目名称:Cadence,代码行数:10,代码来源:BarPlot.py

示例3: _initializeData

# 需要导入模块: from pyaid.ArgsUtils import ArgsUtils [as 别名]
# 或者: from pyaid.ArgsUtils.ArgsUtils import addIfMissing [as 别名]
    def _initializeData(cls, data, track):
        """_initializeData doc..."""

        if data is None:
            data = dict()
        ArgsUtils.addIfMissing('track', track, data)
        ArgsUtils.addIfMissing('debug', [], data)
        return data
开发者ID:sernst,项目名称:Cadence,代码行数:10,代码来源:CurveProjectionSegment.py

示例4: __init__

# 需要导入模块: from pyaid.ArgsUtils import ArgsUtils [as 别名]
# 或者: from pyaid.ArgsUtils.ArgsUtils import addIfMissing [as 别名]
 def __init__(self, **kwargs):
     """Creates a new instance of Histogram."""
     ArgsUtils.addIfMissing('yLabel', 'Frequency', kwargs)
     super(Histogram, self).__init__(**kwargs)
     self.color      = kwargs.get('color', 'b')
     self.binCount   = kwargs.get('binCount', 100)
     self.data       = kwargs.get('data', [])
     self.isLog      = kwargs.get('isLog', False)
开发者ID:sernst,项目名称:Cadence,代码行数:10,代码来源:Histogram.py

示例5: addApplicationLevelWidget

# 需要导入模块: from pyaid.ArgsUtils import ArgsUtils [as 别名]
# 或者: from pyaid.ArgsUtils.ArgsUtils import addIfMissing [as 别名]
    def addApplicationLevelWidget(self, widgetID, widgetClass =None, **kwargs):
        if widgetClass is None:
            widgetClass = ApplicationLevelWidget
            ArgsUtils.addIfMissing('widgetFile', False, kwargs)

        widget = widgetClass(parent=self._appWrappingWidget, **kwargs)
        self._appWrappingWidget.layout().addWidget(widget)
        self._appLevelWidgets[widgetID] = widget
        return widget
开发者ID:sernst,项目名称:PyGlass,代码行数:11,代码来源:PyGlassWindow.py

示例6: __init__

# 需要导入模块: from pyaid.ArgsUtils import ArgsUtils [as 别名]
# 或者: from pyaid.ArgsUtils.ArgsUtils import addIfMissing [as 别名]
    def __init__(self, name =None, app =None, **kwargs):
        """Initializes settings."""
        self._app = app

        ArgsUtils.addIfMissing('headerless', False, kwargs)
        if self._app is None:
            super(ServerLogger, self).__init__(name, printOut=True, **kwargs)
            return

        super(ServerLogger, self).__init__(
            name=name,
            printOut=True,
            logFolder=self._app.logPath,
            **kwargs)
开发者ID:sernst,项目名称:Ziggurat,代码行数:16,代码来源:ServerLogger.py

示例7: __init__

# 需要导入模块: from pyaid.ArgsUtils import ArgsUtils [as 别名]
# 或者: from pyaid.ArgsUtils.ArgsUtils import addIfMissing [as 别名]
    def __init__(self, **kwargs):
        """Creates a new instance of MarkupAttributeError."""

        self._attribute         = ArgsUtils.get('attribute', None, kwargs)
        self._attrGroup         = ArgsUtils.get('attributeGroup', None, kwargs)
        self._rawValue          = ArgsUtils.get('rawValue', None, kwargs)
        self._value             = ArgsUtils.get('value', self._rawValue, kwargs)
        self._attrData          = ArgsUtils.get('attributeData', None, kwargs)
        self._attributeSource   = None

        replacements = ArgsUtils.getAsList('replacements', kwargs)
        replacements.append(
            [u'#ATTR#', unicode(self.attribute if self.attribute else u'???')])
        replacements.append(
            [u'#VAL#', unicode(self.value if self.value else u'???')])
        kwargs['replacements'] = replacements

        ArgsUtils.addIfMissing('errorDef', self.INVALID_ATTRIBUTE, kwargs, True)
        MarkupError.__init__(self, **kwargs)
开发者ID:sernst,项目名称:StaticFlow,代码行数:21,代码来源:MarkupAttributeError.py

示例8: addError

# 需要导入模块: from pyaid.ArgsUtils import ArgsUtils [as 别名]
# 或者: from pyaid.ArgsUtils.ArgsUtils import addIfMissing [as 别名]
 def addError(self, s, err, htmlEscape =False, **kwargs):
     self._hasError = True
     ArgsUtils.addIfMissing('traceStack', True, kwargs)
     return self.add(self.createErrorMessage(s, err), htmlEscape=htmlEscape, **kwargs)
开发者ID:sernst,项目名称:PyAid,代码行数:6,代码来源:Logger.py

示例9: echoError

# 需要导入模块: from pyaid.ArgsUtils import ArgsUtils [as 别名]
# 或者: from pyaid.ArgsUtils.ArgsUtils import addIfMissing [as 别名]
 def echoError(self, s, err, htmlEscape =False, **kwargs):
     ArgsUtils.addIfMissing('traceStack', True, kwargs)
     return self.echo(self.createErrorMessage(s, err), htmlEscape=htmlEscape, **kwargs)
开发者ID:sernst,项目名称:PyAid,代码行数:5,代码来源:Logger.py

示例10: __init__

# 需要导入模块: from pyaid.ArgsUtils import ArgsUtils [as 别名]
# 或者: from pyaid.ArgsUtils.ArgsUtils import addIfMissing [as 别名]
 def __init__(self, **kwargs):
     ArgsUtils.addIfMissing('errorDef', self.READ_FAILURE, kwargs, True)
     MarkupError.__init__(self, **kwargs)
开发者ID:sernst,项目名称:StaticFlow,代码行数:5,代码来源:MarkupGlobalError.py


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