Say I am running a Python script in C:\temp\templates\graphics. I can get the current directory using currDir = os.getcwd(), but how can I use relative path to move up in directories and execute something in C:\temp\config (note: this folder will not always be in C:\)?
Try this one:
os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), "config")
Move up in directory structure