title: Python access to project root directory
body: <p>Below folder structure of my application:</p>
  
  <pre><code>rootfolder
            /subfolder1/
            /subfolder2
            /subfolder3/test.py
  </code></pre>
  
  <p>my code inside of the subfolder3. But I want to write output of the code to <code>subfolder1</code>. </p>
  
  <pre><code>script_dir = os.path.dirname(__file__)
  
  full_path = os.path.join(script_dir,'/subfolder1/')
  </code></pre>
  
  <p>I would like to know how can I do this wihout importing full path to directory.</p>