def walk_parents(path):
    while os.path.splitdrive(path)[1] != os.sep:
        yield path
        path = os.path.dirname(path)
Walks up the tree to the root directory.
dataset/ETHPy150Open reviewboard/rbtools/rbtools/utils/filesystem.py/walk_parents