parameters: (self, name)
return_statement: return self.cache[name]
docstring: Search for a resource and return an absolute file path, or `None`.
  
              The :attr:`path` list is searched in order. The first match is
              returend. Symlinks are followed. The result is cached to speed up
              future lookups.
docstring_summary: Search for a resource and return an absolute file path, or `None`.
docstring_tokens: Search for a resource and return an absolute file path or None .
function: def lookup(self, name):
          ''' Search for a resource and return an absolute file path, or `None`.
  
              The :attr:`path` list is searched in order. The first match is
              returend. Symlinks are followed. The result is cached to speed up
              future lookups. '''
          if name not in self.cache or DEBUG:
              for path in self.path:
                  fpath = os.path.join(path, name)
                  if os.path.isfile(fpath):
                      if self.cachemode in ('all', 'found'):
                          self.cache[name] = fpath
                      return fpath
              if self.cachemode == 'all':
                  self.cache[name] = None
          return self.cache[name]
function_tokens: def lookup ( self , name ) : if name not in self . cache or DEBUG : for path in self . path : fpath = os . path . join ( path , name ) if os . path . isfile ( fpath ) : if self . cachemode in ( 'all' , 'found' ) : self . cache [ name ] = fpath return fpath if self . cachemode == 'all' : self . cache [ name ] = None return self . cache [ name ]