def rec_split_path(path):
if len(path) > <NUM_LIT:1> and path.endswith('<STR_LIT:/>'):<EOL><INDENT>path = path[:-<NUM_LIT:1>]<EOL><DEDENT>if '<STR_LIT:/>' not in path:<EOL><INDENT>return [path,]<EOL><DEDENT>result = []<EOL>while path != '<STR_LIT:/>':<EOL><INDENT>parent, name = os.path.split(path)<EOL>result.append((path, name))<EOL>path = parent<EOL><DEDENT>result.append(('<STR_LIT:/>', '<STR_LIT:/>'))<EOL>result.reverse()<EOL>return result<EOL>
将一个路径进行分隔, 分别得到每父母的绝对路径及目录名