def _split_path(path):
    ' Split a path into a list of directory names '
    if (path[0] != '/'):
        raise Exception('Not absolute path')
    result = []
    while (path != '/'):
        (path, tail) = os.path.split(path)
        if tail:
            result.append(tail)
    return list(reversed(result))
Split a path into a list of directory names
def _split_path(path):
    '  '
    if (path[0] != '/'):
        raise Exception('Not absolute path')
    result = []
    while (path != '/'):
        (path, tail) = os.path.split(path)
        if tail:
            result.append(tail)
    return list(reversed(result))