def get_resources(zfp, name_or_list_of_names):
 names = name_or_list_of_names
 if isinstance(names, basestring):
  names = [names]
 ans = {}
 with zipfile.ZipFile(zfp) as zf:
  for name in names:
   try:
    ans[name] = zf.read(name)
   except:
    import traceback
    traceback.print_exc()
 if (len(names) == 1):
  ans = ans.pop(names[0], None)
 return ans

def get_resources ( zfp , name_or_list_of_names ) : names = name_or_list_of_names if isinstance ( names , basestring ) : names = [ names ] ans = { } with zipfile . ZipFile ( zfp ) as zf : for name in names : try : ans [ name ] = zf . read ( name ) except : import traceback traceback . print_exc ( ) if ( len ( names ) == 1 ) : ans = ans . pop ( names [ 0 ] , None ) return ans
load resources from the plugin zip file .