Knowing the name of my folder "folder_name",
how can i easily get in python (script not in the same folder) the absolute path "/home/user/../path/to/../folder_name" ?
Knowing the name of my folder "folder_name",
how can i easily get in python (script not in the same folder) the absolute path "/home/user/../path/to/../folder_name" ?
import os
directory = os.path.dirname(__file__)
file_path = os.path.join(directory, './filename.extension')
print(file_path)