return a root-first list of all ancestor directories
plus the path itself.
def parts(self, reverse=False):
origin: PathBase
where:
function source:
def parts(self, reverse=False):
""" return a root-first list of all ancestor directories
plus the path itself.
"""
current = self
l = [self]
while 1:
last = current
current = current.dirpath()
if last == current:
break
l.insert(0, current)
if reverse:
l.reverse()
return l
called in /home/johnny/projects/merlinux/py/dist/py/path/local/local.py
called in /home/johnny/projects/merlinux/py/dist/py/path/local/local.py
called in /home/johnny/projects/merlinux/py/dist/py/test/config.py
called in /home/johnny/projects/merlinux/py/dist/py/path/local/local.py
called in /home/johnny/projects/merlinux/py/dist/py/path/local/local.py
called in /home/johnny/projects/merlinux/py/dist/py/path/common.py
called in /tmp/pytest-418/docdoctest/conftest.py
called in /home/johnny/projects/merlinux/py/dist/py/path/local/local.py
called in /home/johnny/projects/merlinux/py/dist/py/path/local/local.py
called in /home/johnny/projects/merlinux/py/dist/py/test/config.py
called in /home/johnny/projects/merlinux/py/dist/py/path/common.py
called in /home/johnny/projects/merlinux/py/dist/py/test/config.py
called in /home/johnny/projects/merlinux/py/dist/py/path/local/local.py
called in /home/johnny/projects/merlinux/py/dist/py/path/local/local.py
called in /home/johnny/projects/merlinux/py/dist/py/path/local/local.py
called in /home/johnny/projects/merlinux/py/dist/py/path/local/local.py
called in /home/johnny/projects/merlinux/py/dist/py/path/local/local.py
called in /home/johnny/projects/merlinux/py/dist/py/path/local/local.py
called in /home/johnny/projects/merlinux/py/dist/py/path/common.py
called in /home/johnny/projects/merlinux/py/dist/py/path/local/local.py
called in /home/johnny/projects/merlinux/py/dist/py/path/local/local.py