code: def rel_path(self, other):
          
  
          # This complicated and expensive method, which constructs relative
          # paths between arbitrary Node.FS objects, is no longer used
          # by SCons itself.  It was introduced to store dependency paths
          # in .sconsign files relative to the target, but that ended up
          # being significantly inefficient.
          #
          # We're continuing to support the method because some SConstruct
          # files out there started using it when it was available, and
          # we're all about backwards compatibility..
  
          try:
              memo_dict = self._memo['rel_path']
          except KeyError:
              memo_dict = {}
              self._memo['rel_path'] = memo_dict
          else:
              try:
                  return memo_dict[other]
              except KeyError:
                  pass
  
          if self is other:
              result = '.'
  
          elif not other in self._path_elements:
              try:
                  other_dir = other.get_dir()
              except AttributeError:
                  result = str(other)
              else:
                  if other_dir is None:
                      result = other.name
                  else:
                      dir_rel_path = self.rel_path(other_dir)
                      if dir_rel_path == '.':
                          result = other.name
                      else:
                          result = dir_rel_path + OS_SEP + other.name
          else:
              i = self._path_elements.index(other) + 1
  
              path_elems = ['..'] * (len(self._path_elements) - i) \
                           + [n.name for n in other._path_elements[i:]]
  
              result = OS_SEP.join(path_elems)
  
          memo_dict[other] = result
  
          return result
docs: Return a path to "other" relative to this directory.