def Basename(self):
    for component in reversed(self):
        basename = posixpath.basename(component.path)
        if basename:
            return basename
    return ''
def Basename(self):
    for component in reversed(self):
        basename = posixpath.basename(component.path)
        if basename:
            return basename
    return 