human
2to3 whole directory.
assistant
Here is a Python function to 2to3 whole directory

import os

def _2to3(path):
    """Convert a path to a 2to3-compatible path."""
    return path.replace("\\", "/")

# Enter the relative path
path = "C:\\Users\\carnation\\Desktop\\python_exercises\\relative_path"

# Calling the function
absolute_path = _2to3(path)

# Printing the absolute path
print(absolute_path)

#Example Output
# C:/Users/carnation/Desktop/python_exercises/relative_path

#Remember to inspect code for bugs.