code: def ancestor_paths(start=None, limit={}):
      
      import utool as ut
      limit = ut.ensure_iterable(limit)
      limit = {expanduser(p) for p in limit}.union(set(limit))
      if start is None:
          start = os.getcwd()
      path = start
      prev = None
      while path != prev and prev not in limit:
          yield path
          prev = path
          path = dirname(path)
docs: All paths above you