本文整理汇总了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)
示例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)
示例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
示例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)
示例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
示例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)
示例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)
示例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)
示例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)
示例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)