title: how to os.mkdir() above current root path in python
body: <p>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:</p>
  
  <pre><code>dirA --&gt;
      dirBinA --&gt;
          peter.py
          griffin.sh
      dirCinA --&gt;
          index.py &lt;--------- this is the flask app that's running
          tom.css
          dick.html
          harry.js
      dirDinA --&gt;  &lt;--------- this directory doesn't exist yet
          anotherDir --&gt;
              turtle.py
  </code></pre>
  
  <p>i want to create a new directory <code>anotherDir</code> inside a new directory <code>dirDinA</code> from the flask app that's running in <code>dirCinA/index.py</code></p>
  
  <p>If I try with <code>os.mkdir("../dirDinA/anotherDir/")</code>, then flask says <code>OSError: [Errno 2] No such file or directory: '../dirDinA/anotherDir'</code></p>