i am running a flask project and i am looking for a way to create a directory ABOVE the path from which the current App is running. For example:
dirA -->
dirBinA -->
peter.py
griffin.sh
dirCinA -->
index.py <--------- this is the flask app that's running
tom.css
dick.html
harry.js
dirDinA --> <--------- this directory doesn't exist yet
anotherDir -->
turtle.py
i want to create a new directory anotherDir
inside a new directory dirDinA
from the flask app that's running in dirCinA/index.py
If I try with os.mkdir("../dirDinA/anotherDir/")
, then flask says OSError: [Errno 2] No such file or directory: '../dirDinA/anotherDir'