def ManifestFromResFile(filename, names=None, languages=None):
 res = GetManifestResources(filename, names, languages)
 pth = []
 if (res and res[RT_MANIFEST]):
  while (isinstance(res, dict) and res.keys()):
   key = res.keys()[0]
   pth.append(str(key))
   res = res[key]
 if isinstance(res, dict):
  raise InvalidManifestError(("No matching manifest resource found in '%s'" % filename))
 manifest = Manifest()
 manifest.filename = ':'.join(([filename] + pth))
 manifest.parse_string(res, False)
 return manifest

def ManifestFromResFile ( filename , names = None , languages = None ) : res = GetManifestResources ( filename , names , languages ) pth = [ ] if ( res and res [ RT_MANIFEST ] ) : while ( isinstance ( res , dict ) and res . keys ( ) ) : key = res . keys ( ) [ 0 ] pth . append ( str ( key ) ) res = res [ key ] if isinstance ( res , dict ) : raise InvalidManifestError ( ( "No matching manifest resource found in '%s'" % filename ) ) manifest = Manifest ( ) manifest . filename = ':' . join ( ( [ filename ] + pth ) ) manifest . parse_string ( res , False ) return manifest
create and return manifest instance from resource in dll/exe file .