

def parse_path(root_dir):
    '\n    Split path into head and last component for the completer.\n    Also return position where last component starts.\n    :param root_dir: path\n    :return: tuple of (string, string, int)\n    '
    (base_dir, last_dir, position) = ('', '', 0)
    if root_dir:
        (base_dir, last_dir) = os.path.split(root_dir)
        position = ((- len(base_dir)) if last_dir else 0)
    return (base_dir, last_dir, position)

dataset/ETHPy150Open j-bennet/wharfee/wharfee/helpers.py parse_path/VarMisuse@55/145 `last_dir`->`base_dir`