本文整理汇总了Python中BugDll.isVersion方法的典型用法代码示例。如果您正苦于以下问题:Python BugDll.isVersion方法的具体用法?Python BugDll.isVersion怎么用?Python BugDll.isVersion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BugDll
的用法示例。
在下文中一共展示了BugDll.isVersion方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: translate
# 需要导入模块: import BugDll [as 别名]
# 或者: from BugDll import isVersion [as 别名]
def translate(self):
self.title = BugUtil.getPlainText(self.xmlKey + "_TEXT", self.title)
self.tooltip = BugUtil.getPlainText(self.xmlKey + "_HOVER", self.tooltip)
if self.isDll():
if BugDll.isVersion(self.dll):
self.tooltip = RE_DLL_ALL_TAGS.sub("", self.tooltip)
else:
if not BugDll.isPresent():
dllText = BugUtil.getPlainText("TXT_KEY_BULL_REQUIRED")
else:
dllText = BugUtil.getPlainText("TXT_KEY_BULL_REQUIRED_NEWER")
if self.tooltip.find("[DLL") >= 0:
self.tooltip = RE_DLL_START_END_TAGS.sub("", self.tooltip)
self.tooltip = RE_DLL_MSG_TAG.sub(dllText, self.tooltip)
else:
self.tooltip += "\n" + dllText
elif self.tooltip.find("[DLL") >= 0:
if not BugDll.isPresent():
# no DLL, ignore all minimum versions and use standard error message
self.tooltip = RE_DLL_START_END_TAGS.sub("", self.tooltip)
self.tooltip = RE_DLL_MSG_TAG.sub(BugUtil.getPlainText("TXT_KEY_BULL_REQUIRED"), self.tooltip)
else:
dllText = BugUtil.getPlainText("TXT_KEY_BULL_REQUIRED_NEWER")
def repl(matchobj):
try:
if BugDll.isVersion(int(matchobj.group(1))):
return ""
else:
return RE_DLL_MSG_TAG.sub(dllText, matchobj.group(2))
except:
# invalid version
return ""
self.tooltip = RE_DLL_CAPTURE_VERSION_MESSAGE.sub(repl, self.tooltip)
self.translated = True
示例2: repl
# 需要导入模块: import BugDll [as 别名]
# 或者: from BugDll import isVersion [as 别名]
def repl(matchobj):
try:
if BugDll.isVersion(int(matchobj.group(1))):
return ""
else:
return RE_DLL_MSG_TAG.sub(dllText, matchobj.group(2))
except:
# invalid version
return ""
示例3: __init__
# 需要导入模块: import BugDll [as 别名]
# 或者: from BugDll import isVersion [as 别名]
def __init__(self, mod, id, andId=None, dll=None):
self.mod = mod
self.id = id
self.andId = andId
self.andOption = None
self.dll = BugDll.decode(dll)
if self.dll is not None and self.dll <= 0:
BugUtil.warn("BugOptions - %s has invalid dll value %r, ignoring", id, dll)
self.dll = None
self.enabled = True
if self.dll > 0:
if not BugDll.isVersion(self.dll):
self.enabled = False
示例4: isDllOkay
# 需要导入模块: import BugDll [as 别名]
# 或者: from BugDll import isVersion [as 别名]
def isDllOkay(self, element, dll):
dll = self.resolveDll(element, dll)
if dll is not None:
element.setState("dll", dll)
return BugDll.isVersion(dll)
return True