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


Python winerror.ERROR_RESOURCE_DATA_NOT_FOUND属性代码示例

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


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

示例1: extract_manifest

# 需要导入模块: import winerror [as 别名]
# 或者: from winerror import ERROR_RESOURCE_DATA_NOT_FOUND [as 别名]
def extract_manifest(path, resource_name):
  """Reads manifest from |path| and returns it as a string.
  Returns None is there is no such manifest."""
  with LoadLibrary(path) as handle:
    try:
      return win32api.LoadResource(handle, RT_MANIFEST, resource_name)
    except pywintypes.error as error:
      if error.args[0] == winerror.ERROR_RESOURCE_DATA_NOT_FOUND:
        return None
      else:
        raise 
开发者ID:refack,项目名称:GYP3,代码行数:13,代码来源:gyptest-link-generate-manifest.py

示例2: extract_manifest

# 需要导入模块: import winerror [as 别名]
# 或者: from winerror import ERROR_RESOURCE_DATA_NOT_FOUND [as 别名]
def extract_manifest(path, resource_name):
  """Reads manifest from |path| and returns it as a string.
  Returns None is there is no such manifest."""
  with LoadLibrary(path) as handle:
    try:
      return win32api.LoadResource(
          handle, RT_MANIFEST, resource_name).decode('utf-8', 'ignore')
    except pywintypes.error as error:
      if error.args[0] == winerror.ERROR_RESOURCE_DATA_NOT_FOUND:
        return None
      else:
        raise 
开发者ID:refack,项目名称:GYP3,代码行数:14,代码来源:gyptest-link-update-manifest.py

示例3: extract_manifest

# 需要导入模块: import winerror [as 别名]
# 或者: from winerror import ERROR_RESOURCE_DATA_NOT_FOUND [as 别名]
def extract_manifest(path, resource_name):
    """Reads manifest from |path| and returns it as a string.
    Returns None is there is no such manifest."""
    with LoadLibrary(path) as handle:
      try:
        return win32api.LoadResource(handle, RT_MANIFEST, resource_name)
      except pywintypes.error as error:
        if error.args[0] == winerror.ERROR_RESOURCE_DATA_NOT_FOUND:
          return None
        else:
          raise 
开发者ID:turbulenz,项目名称:gyp,代码行数:13,代码来源:gyptest-link-generate-manifest.py

示例4: extract_manifest

# 需要导入模块: import winerror [as 别名]
# 或者: from winerror import ERROR_RESOURCE_DATA_NOT_FOUND [as 别名]
def extract_manifest(path, resource_name):
    """Reads manifest from |path| and returns it as a string.
    Returns None is there is no such manifest."""
    with LoadLibrary(path) as handle:
      try:
        return win32api.LoadResource(
            handle, RT_MANIFEST, resource_name).decode('utf-8', 'ignore')
      except pywintypes.error as error:
        if error.args[0] == winerror.ERROR_RESOURCE_DATA_NOT_FOUND:
          return None
        else:
          raise 
开发者ID:turbulenz,项目名称:gyp,代码行数:14,代码来源:gyptest-link-update-manifest.py


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