(path)
return path[:i], path[i + 1:]
Replacement for os.path.split().
Replacement for os.path.split().
Replacement for os . path . split () .
def _path_split(path):
    """Replacement for os.path.split()."""
    i = max(path.rfind(p) for p in path_separators)
    if i < 0:
        return '', path
    return path[:i], path[i + 1:]
def _path_split ( path ) : i = max ( path . rfind ( p ) for p in path_separators ) if i < 0 : return '' , path return path [ : i ] , path [ i + 1 : ]