how to get the base directory of th project in python code example Example: python how to get project location ROOT_DIR = os.path.dirname(os.path.abspath(__file__))