path to working directory from root python code example Example: Python project root dir import os ROOT_DIR = os.path.abspath(os.curdir)