本文整理汇总了Python中netzob.Common.ResourcesConfiguration.ResourcesConfiguration.getPluginsStaticResources方法的典型用法代码示例。如果您正苦于以下问题:Python ResourcesConfiguration.getPluginsStaticResources方法的具体用法?Python ResourcesConfiguration.getPluginsStaticResources怎么用?Python ResourcesConfiguration.getPluginsStaticResources使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类netzob.Common.ResourcesConfiguration.ResourcesConfiguration
的用法示例。
在下文中一共展示了ResourcesConfiguration.getPluginsStaticResources方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _findUiResource
# 需要导入模块: from netzob.Common.ResourcesConfiguration import ResourcesConfiguration [as 别名]
# 或者: from netzob.Common.ResourcesConfiguration.ResourcesConfiguration import getPluginsStaticResources [as 别名]
def _findUiResource(self, resource):
r = os.path.join(ResourcesConfiguration.getStaticResources(), "ui", resource)
if os.path.isfile(r):
return r
r = os.path.join(ResourcesConfiguration.getPluginsStaticResources(), "ui", resource)
if os.path.isfile(r):
return r
raise NetzobAbstractViewException(_("Requested file ({0}) was not found.").format(resource))
示例2: getPluginStaticResourcesPath
# 需要导入模块: from netzob.Common.ResourcesConfiguration import ResourcesConfiguration [as 别名]
# 或者: from netzob.Common.ResourcesConfiguration.ResourcesConfiguration import getPluginsStaticResources [as 别名]
def getPluginStaticResourcesPath(self):
"""Computes and returns the path to the static
resources associated with the current plugin"""
try:
pluginPath = os.path.join(ResourcesConfiguration.getPluginsStaticResources(),
self.getName())
logging.debug("The computed path for plugins' static resources is: {0}.".format(pluginPath))
return pluginPath
except ResourcesConfigurationException, e:
raise NetzobPluginException(str(e))