def resource_find(filename):
 if (not filename):
  return None
 if (filename[:8] == 'atlas://'):
  return filename
 if exists(abspath(filename)):
  return abspath(filename)
 for path in reversed(resource_paths):
  output = abspath(join(path, filename))
  if exists(output):
   return output
 if (filename[:5] == 'data:'):
  return filename
 return None

def resource_find ( filename ) : if ( not filename ) : return None if ( filename [ : 8 ] == 'atlas://' ) : return filename if exists ( abspath ( filename ) ) : return abspath ( filename ) for path in reversed ( resource_paths ) : output = abspath ( join ( path , filename ) ) if exists ( output ) : return output if ( filename [ : 5 ] == 'data:' ) : return filename return None
search for a resource in the list of paths .